From owner-freebsd-hackers Mon Sep 1 20:23:03 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id UAA10227 for hackers-outgoing; Mon, 1 Sep 1997 20:23:03 -0700 (PDT) Received: from nico.telstra.net (nico.telstra.net [139.130.204.16]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id UAA10221 for ; Mon, 1 Sep 1997 20:22:59 -0700 (PDT) Received: from freebie.lemis.com (gregl1.lnk.telstra.net [139.130.136.133]) by nico.telstra.net (8.6.10/8.6.10) with ESMTP id NAA29094; Tue, 2 Sep 1997 13:21:58 +1000 Received: (grog@localhost) by freebie.lemis.com (8.8.7/8.6.12) id MAA22785; Tue, 2 Sep 1997 12:51:47 +0930 (CST) Message-ID: <19970902125147.42934@lemis.com> Date: Tue, 2 Sep 1997 12:51:47 +0930 From: Greg Lehey To: dg@root.com Cc: "Jamil J. Weatherbee" , freebsd-hackers@FreeBSD.ORG Subject: Re: SIGCLD References: <199709020249.TAA16490@implode.root.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.81e In-Reply-To: <199709020249.TAA16490@implode.root.com>; from David Greenman on Mon, Sep 01, 1997 at 07:49:17PM -0700 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8250 Fax: +61-8-8388-8250 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Fight-Spam-Now: http://www.cauce.org Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Mon, Sep 01, 1997 at 07:49:17PM -0700, David Greenman wrote: >>> however, you change the default to explicitly ignore the signal, the >>> system ignores SIGCHLD and SIGCLD, but it also no longer creates >>> zombie processes. If you set the disposition of SIGCHLD and SIGCLD >>> to ignore, but you call wait anyway, it waits until all child >>> processes have terminated, and then returns -1 (error), with errno >>> set to ECHILD. You can achieve the same effect with sigaction by >> >> Ok, according to the man page the default is to ignore SIGCHLD, so in >> other words if I really don't care at all about the info in the data >> tables I don't need to install a handler that calls wait --- I just wanted >> to be sure that if I did not fool around with a SIGCHLD handler under >> freebsd that I wouldn't end up with hundreds on zombie processes waiting. > > Uh, I think you are misunderstanding this. Under FreeBSD, you *must* > call wait to reap child processes. Ignoring SIGCHLD doesn't let you off > the hook. The behavior is different under System V, but that isn't > relavent. Yes, looking back, I noticed that the text didn't say very much about the way BSD does it. Sorry about that. Greg