home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / aix / 11515 < prev    next >
Encoding:
Internet Message Format  |  1992-11-12  |  1.3 KB

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