Why do ps, uptime (& probably others) check vmunix version?

Badri Lokanathan badri at ur-helheim.UUCP
Tue Feb 11 03:43:09 AEST 1986


We run BSD4.2 on a 750.
I installed a new vmunix and did not link it to /vmunix, but left it
as /vmunix.blah. Then I booted with B/1 and entered the appropriate
stuff. Well, it booted off fine; everything was OK till I checked
uptime and ps and got garbage. I tracked down the problem in the
source of ps to the following:

getkvars(argc, argv)
	char **argv;
{
	register struct nlist *nlp;

	nlistf = argc > 1 ? argv[1] : "/vmunix";
	.
	.
	.
Since /vmunix was linked to the old version of vmunix, naturally it barfed.
So, here is my question. Why should ps (and any other program) examine the
name of vmunix? This is particularly aggravating if a new kernel is being
tested - I do not want to make too many changes, just in case.
My apologies if I sound terribly naive!

Badri Lokanathan



More information about the Comp.unix.wizards mailing list