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 - [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED]
"All of this is for nothing if we don't go to the stars" - JMS/B5
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message