Defunct Processes

uunet!bria!mike uunet!bria!mike
Thu Feb 14 18:48:46 AEST 1991


In an article, sun.com!iis!venkat writes:
|I am sure this question was asked several times but I did not keep track
|of it. I have a daemon process which forks out to do various tasks and 
|also notices the termination of its children by doing a
|   signal(SIGCHLD, function)
|However when I do a ps, I find several defunct processes, apparently
|children of my daemon process. How do I prevent such processes being in the
|system? What exactly is a defunct process. I am running my processes on a
|Sun 4. Thanks.

A defunct process is a process that has exited but it's parent has not
called wait() to get it's exit status.  Somewhere in your function, you
need to call wait().
-- 
Michael Stefanik                       | Opinions stated are not even my own.
Systems Engineer, Briareus Corporation | UUCP: ...!uunet!bria!mike
-------------------------------------------------------------------------------
technoignorami (tek'no-ig'no-ram`i) a group of individuals that are constantly
found to be saying things like "Well, it works on my DOS machine ..."



More information about the Comp.unix.questions mailing list