Getting rid of a <defunct> process

Brandon S. Allbery allbery at ncoast.ORG
Sat Feb 18 11:36:29 AEST 1989


As quoted from <102 at avatar.UUCP> by kory at avatar.UUCP (Kory Hamzeh):
+---------------
| I have written an application which forks and execs off many subtasks.
| The main process (the parent which does all of the forks) can not
| do a wait() because I can't get blocked for anything. Well, this results
| in a lot of "<defunct>" processes in the process table when the child
| exits.
+---------------

Add a call to signal(SIGCLD, SIG_IGN).  This tells the system to not leave
zombies around for child processes.

++Brandon
-- 
Brandon S. Allbery, moderator of comp.sources.misc	     allbery at ncoast.org
uunet!hal.cwru.edu!ncoast!allbery		    ncoast!allbery at hal.cwru.edu
      Send comp.sources.misc submissions to comp-sources-misc@<backbone>
NCoast Public Access UN*X - (216) 781-6201, 300/1200/2400 baud, login: makeuser



More information about the Comp.unix.questions mailing list