process ids

der Mouse mouse at mcgill-vision.UUCP
Sun Sep 11 19:53:01 AEST 1988


In article <787 at philmds.UUCP>, leo at philmds.UUCP (Leo de Wit) writes:
> In article <171 at ispi.UUCP> jbayer at ispi.UUCP (id for use with uunet/usenet) writes:
>> I have a need to be able to identify the parent of a process which
>> is executing on the system.  [...]  The idea is to be able to kill
>> an entire process group with one kill().

Look at killpg().  Or use the negative of the process group number as
the process ID.  Or do you mean something else by "process group"?

If you reall want to dig this out of the kernel, you'll need to play
games with nlist and /dev/kmem the way ps does.

> See the manual page[s] [for] getppid(2) for the parent process id

getppid() gets the process ID of the parent of *its caller*.  It can't
be used to obtain the parent process ID of any other process.

					der Mouse

			old: mcgill-vision!mouse
			new: mouse at larry.mcrcim.mcgill.edu



More information about the Comp.unix.microport mailing list