Xref: utzoo comp.unix.questions:9165 comp.unix.microport:1521 Path: utzoo!attcan!uunet!husc6!bloom-beacon!mcgill-vision!mouse From: mouse@mcgill-vision.UUCP (der Mouse) Newsgroups: comp.unix.questions,comp.unix.microport Subject: Re: process ids Keywords: utmp ps process id Message-ID: <1303@mcgill-vision.UUCP> Date: 11 Sep 88 09:53:01 GMT References: <171@ispi.UUCP> <787@philmds.UUCP> Organization: McGill University, Montreal Lines: 21 In article <787@philmds.UUCP>, leo@philmds.UUCP (Leo de Wit) writes: > In article <171@ispi.UUCP> jbayer@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@larry.mcrcim.mcgill.edu