Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site uw-june Path: utzoo!watmath!clyde!cbosgd!ihnp4!houxm!vax135!cornell!uw-beaver!uw-june!pjs From: pjs@uw-june (Philip J. Schneider) Newsgroups: net.unix-wizards,net.unix Subject: UNIX question Message-ID: <156@uw-june> Date: Thu, 5-Dec-85 19:38:33 EST Article-I.D.: uw-june.156 Posted: Thu Dec 5 19:38:33 1985 Date-Received: Sat, 7-Dec-85 05:19:30 EST Organization: U of Washington Computer Science Lines: 44 Keywords: zombies Xref: watmath net.unix-wizards:15982 net.unix:6539 I have a C program which, during the course of its execution, spawns(forks) child processes. I should mention that a process is spawned, it lives for a while, then exits, and then sometime later the same thing happens, and so on. This all happens within the lifetime of the parent, and I would like to do this an arbitrary number of times. Sometimes, two or more child processes exist at once, but the upper limit on child processes that exist concurrently is low, and a group of such children exit before the next process begins. Since UNIX only allows one a certain number of processes at a time, eventually during the course of execution of the parent I run out of processes. If I temporarily stop the parent process execution and do a 'ps', the child processes show up in the list with a 'Z' status. They do not completely disappear until the parent process exits. As some of you probably already know, these useless ex-processes can't even be completely gotten rid of with a 'kill' command. The result is that these processes are taking up my process quota, even though they are dead in all practical terms (in that they finished their work and exited properly). Of course, they do go away completely once the parent exits. I can certainly understand why one is allowed only a limited number of active processes at any time. My processes, however, are not at all active once they have exited, and I feel that once a process exits, I should have my quota "credited" so that I can get more. Clearly, my problem is how to get around this situation. I could (possibly) get a higher limit on my process quota, but this would only mean that running out of processes will happen a little later. My question: Is there any way to kill off these zombies so I can get more processes ? Or, failing that, is there any other way to do what I want ? Please respond by e-mail if you can help at all, or if you need more details. Thanks in advance. -- Philip Schneider University of Washington Computer Science pjs@{uw-june.arpa,washington.arpa} {ihnp4,decvax,cornell}!uw-beaver!uw-june!pjs