Date: Sun, 10 Jun 2001 17:20:50 -0700 From: Peter Wemm <peter@wemm.org> To: Matt Dillon <dillon@earth.backplane.com> Cc: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>, David Malone <dwmalone@maths.tcd.ie>, Terry Lambert <tlambert2@mindspring.com>, hackers@FreeBSD.ORG Subject: Re: signal(SIGCHLD, SIG_IGN) patch solving SUSv2 compatibility issue Message-ID: <20010611002050.362CE380E@overcee.netplex.com.au> In-Reply-To: <200106101845.f5AIje014790@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Matt Dillon wrote: > > :... > : > :sigemptyset(&sa.sa_mask); > :sa.sa_flags = 0; > :sa.sa_handler = SIG_IGN; > :sigaction(SIGCHLD, &sa, NULL); > : > :zombies are still created in FreeBSD, which is against SUSv2. > : > :My citation was quoted directly from sigaction() page and not > :from signal() page. Unfortunately, I do not have access to POSIX, > :so I do not know if it is specified in SUSv2 only or if it is > :specified in both SUSv2 and in POSIX. I'm afraid that it is in both. > :However I think, that FreeBSD wants to be SUSv2 compliant too, or not? > :... > > I did some research and while I couldn't find the official POSIX > spec, I did read the SUSv2 spec carefully and I looked at a lot of > manual pages. > > I believe your change is correct. We should disable zombie reaping > if SIGCHLD is set to SIG_IGN. This is, in fact, how most systems do > it. BSD is like the sickly child in some respects :-) > > Your (revised) patch, which I have reproduced below along with a > little cleanup, looks correct. I compiled up a kernel with the > revised patch and tested it, and it seems to work as advertised. > > I would say this should go into -current now. I would be happy to > do this, or David Malone can since he provided the fix to the original > patch. I agree totally. This should have been done ages ago, I've been burned on it a few times, but never badly enough to go fix it. > I would also recommend that we MFC the patch to -stable after a few days. > It is highly unlikely to break anything. I suppose I could take the > heat for that :-) Every major forking program I've ever written has had > to set the sigaction flag *AND* set the signal handle to SIG_IGN to be > portable, and while I probably won't stop, it would be nice to know that > FreeBSD works both ways. Yes. > -Matt Cheers, -Peter -- Peter Wemm - peter@FreeBSD.org; peter@yahoo-inc.com; peter@netplex.com.au "All of this is for nothing if we don't go to the stars" - JMS/B5 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010611002050.362CE380E>