command line shown by ps
Scott Lurndal
scottl at convergent.com
Fri Feb 22 06:28:27 AEST 1991
In article <JOCKC.91Feb20103537 at hammer.idsila.com>, jockc at hammer.idsila.com (PRIV Account) writes:
|> How can a process change or obscure the command line that
|> ps (and other programs like w or whodo) show for it?
|>
|> This could obviously be desirable for security reasons, but also for
|> informational purposes. For example, when a program forks a child
|> process to do something, the child proc might want to change
|> its "command line" (what ps shows, which by now probably has little
|> meaning) to something more descriptive of what its doing.
|>
|> I know this is going to vary depending on system type. I'm on
|> DS3100 Ultrix, but I'd also like to know how its done on other common
|> systems, or where that information would be found.
|>
|> Thanks for any insights.
|>
|> Jock Cooper
|> uunet!hammer!jockc
This data is kept in the u area for the process at exec(2) time.
Most operating systems don't allow a program to write to the u area;
therefore you cannot change it.
More information about the Comp.unix.questions
mailing list