Finding if a process is active

/32767 tif at doorstop.austin.ibm.com
Thu Jun 14 04:28:20 AEST 1990


In article <13095 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:
>Processes don't have names, only numbers (PIDs).  The image that was
>exec()ed came from a file that had a name, but the process could
>easily alter the only record of the name assigned to its argv[0],

I thought that the "name" was stored in two separate places?  argv[0]
was just one place.  I was led to believe that this is the difference
between "ps" and "ps -f".  The output of "ps -f" can be tinkered with
but the output of "ps" (according to my info) was guaranteed.

For instance, when you run nethack (I think it was), it tried to hide
itself by changing its name.  "ps -f" would give "-" as the name, but
just "ps" would give "nethack".  (I have come to believe that the latter
name is what is used for process accounting as well.)

Am I completely off?

(Mail may not make it to me...)
Paul Chamberlain | I do NOT represent IBM	  tif at doorstop, sc30661 at ausvm6
512/838-7008	 | ...!cs.utexas.edu!ibmaus!auschs!doorstop.austin.ibm.com!tif



More information about the Comp.unix.questions mailing list