Parenthesized arguments in a "ps" list

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Sun Nov 13 18:34:53 AEST 1983


 think we've been over this before...

The reason that ps and derivatives (e.g. w) sometimes print commands
in parentheses is that whoever wrote ps liked it that way.  The
parens indicate that the command overwrote its name, and that ps
(w) is printing the name by which the command was invoked (and by
which it will be logged in the accounting file).  Basically, it's

	if (strcmp (proc->invocation, proc->argv[0]) != 0)
		printf ("(%s)", proc->invocation);

Apparently in the case of a long environment variable, the program
is getting confused, and thinks the command name was overwritten.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris.umcp-cs at CSNet-Relay



More information about the Comp.unix.wizards mailing list