Xref: utzoo comp.unix.questions:11656 comp.unix.wizards:14650 comp.unix.xenix:4930 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!madd From: madd@bu-cs.BU.EDU (Jim Frost) Newsgroups: comp.unix.questions,comp.unix.wizards,comp.unix.xenix Subject: Re: Getting rid of a process Message-ID: <27866@bu-cs.BU.EDU> Date: 12 Feb 89 18:09:12 GMT References: <102@avatar.UUCP> Reply-To: madd@bu-it.bu.edu (Jim Frost) Followup-To: comp.unix.questions Distribution: usa Organization: Associative Design Technology Lines: 32 In article <102@avatar.UUCP> kory@avatar.UUCP (Kory Hamzeh) writes: |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 "" processes in the process table when the child |exits. | |Is there any way to get rid of these processes? If not, will they take |up any core space? I assume they will take up a slot in the process table. What I usually do is: fireman() /* catches falling children */ { union wait wstatus; while (wait3(&wstatus, WNOHANG, NULL) >= 0) ; } main() { signal(SIGCHLD, fireman); /*...*/ } processes (also called "zombies") definitely take up process table entries and probably take up many more resources. Exactly what a zombie process holds depends on the operating system implementation. jim frost madd@bu-it.bu.edu