From owner-freebsd-hackers Fri Aug 25 3:40:34 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from pike.osd.bsdi.com (pike.osd.bsdi.com [204.216.28.222]) by hub.freebsd.org (Postfix) with ESMTP id 1350037B422 for ; Fri, 25 Aug 2000 03:40:33 -0700 (PDT) Received: (from jhb@localhost) by pike.osd.bsdi.com (8.9.3/8.9.3) id DAA74998; Fri, 25 Aug 2000 03:39:50 -0700 (PDT) (envelope-from jhb) From: John Baldwin Message-Id: <200008251039.DAA74998@pike.osd.bsdi.com> Subject: Re: Preventing zombies to occure In-Reply-To: <200008251012.DAA14106@user2.hushmail.com> from "core-ix@hushmail.com" at "Aug 25, 2000 03:13:52 am" To: core-ix@hushmail.com Date: Fri, 25 Aug 2000 03:39:50 -0700 (PDT) Cc: hackers@FreeBSD.org X-Mailer: ELM [version 2.4ME+ PL68 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG core-ix@hushmail.com 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 :-). I'll betray some of my own ignorance here, but what about processes where the parent exits before the child? For example, when starting a server, it is customary for the foreground process to fork a background child to be the actual server process and then exit. You might be able to work around that problem and the one you are tackling by adding some smarts to exit(2) so that when a process exits, it checks to see if any of its children are zombies and clears them if so, and for a process to not become a zombie upon exit(2) unless it's parent is still around. -- John Baldwin -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message