From owner-freebsd-hackers Fri Aug 25 3:47:37 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from fw.wintelcom.net (ns1.wintelcom.net [209.1.153.20]) by hub.freebsd.org (Postfix) with ESMTP id E972537B424 for ; Fri, 25 Aug 2000 03:47:34 -0700 (PDT) Received: (from bright@localhost) by fw.wintelcom.net (8.10.0/8.10.0) id e7PAl3413151; Fri, 25 Aug 2000 03:47:03 -0700 (PDT) Date: Fri, 25 Aug 2000 03:47:03 -0700 From: Alfred Perlstein To: core-ix@hushmail.com Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Preventing zombies to occure Message-ID: <20000825034703.L1209@fw.wintelcom.net> References: <200008251012.DAA14106@user2.hushmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.4i In-Reply-To: <200008251012.DAA14106@user2.hushmail.com>; from core-ix@hushmail.com on Fri, Aug 25, 2000 at 10:14:18AM +0000 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG * core-ix@hushmail.com [000825 03:14] wrote: > Hello, > > I have some ideas to improve fork()-ing and getting rid of zombie processes. > This things mentioned here are proposed of a man that do not know very well > (author means 'the depths' of) BSD kernel source although he have some ex- > pirience with it (mainly in reading it :-). > > By definition zombie is a process entry in proc table that wasn't released > by wait*() called form the parent's code. So all we need to do is to ensure > that parent will call wait*() as many times as it called fork(). This meth- > od have some advantages but it has some disadvantages too. First of all, > we > provide programmers & all users with full out-of-zombies enviroment where > everything created will be destroyed in the right way. Second, proposed > me- > thod is easy to include in current source with minnor modifications. > [snip] If a parent that has zombie children exits the kernel will attach them to init (I haven't checked, but this is the common unix solution). init will be calling waitpid to clear zombies automagically. So this sorta already happens. :) -- -Alfred Perlstein - [bright@wintelcom.net|alfred@freebsd.org] "I have the heart of a child; I keep it in a jar on my desk." To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message