home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!vnet.ibm.com
- From: russotto@vnet.ibm.com
- Message-ID: <19921112.055901.542@almaden.ibm.com>
- Date: Thu, 12 Nov 92 08:58:45 EST
- Newsgroups: comp.unix.aix
- Subject: Re: Help: child processes not exiting properly.
- Disclaimer: This posting represents the poster's views, not those of IBM
- News-Software: UReply 3.0
- References: <1992Nov10.022021.1423@mlogic.uucp>
- <1992Nov11.191625.2765@awdprime.austin.ibm.com>
- Lines: 18
-
- In <1992Nov11.191625.2765@awdprime.austin.ibm.com> Jeff Peek writes:
- >The parent must either issue a wait system call (wait3, waitpid or wait), or the
- >parent must set the action for the SIGCHLD signal to SIG_IGN. Otherwise the proc
- >table entry for the child (and that is all that is left) will continue to hang
- >around waiting for the parent to collect the exit status.
-
- I'm not sure setting SIGCHLD to SIG_IGN is always good enough-- here's
- a situation I think I've observed:
- Process A (SIGCHLD == SIG_IGN) forks and execs Process B
- (SIGCHLD == SIG_DFL). Process B forks off Processes C and D, which then
- die, leaving zombies. Process B then dies. Process B's zombie goes
- away, but the zombies of C and D remain, as children of A. The only
- way I know to avoid this (assuming you can't make all possible 'B's work
- properly) is to set up a signal handler for SIGCHLD in A which wait3s
- until all the zombies are gone.
-
- .
- QUIT
-