ps sometimes does not print command arguments

G.R.Tomasevich grt at twitch.UUCP
Wed Jun 22 00:24:51 AEST 1988


People complained about 'ps' only showing the command name in square
brackets instead of printing the arguments, too.  This is because the
environment is too big, though I am not sure what the limit is.  Apparently
the code is not smart enough or it is not possible to find the arguments
on the stack (or its image in the swap) when the environment exceeds
some size.  You can actually see the arguments of a command.
Write a test program that calls 'execle(2)' or 'execve(2)'
with the environment pointer supplied as '(char**)0' and with some
command and arguments.  Have the program fork, have the parent sleep,
have the child exec something that maybe sleeps.  From another layer, do a 'ps'
on the original layer, and you will see the child with its arguments.
Or, start up a login with virtually no environment (but who ever works
that way?).  I tried this on 'twitch', a VAX running 5.2, but not yet
on my UNIX PC.  What is the fix?  I dunno.
-- 
	George Tomasevich, att!twitch!grt
	AT&T Bell Laboratories, Holmdel, NJ



More information about the Unix-pc.general mailing list