Anton Berezin <[EMAIL PROTECTED]> writes:

> On Thu, Jul 12, 2001 at 08:45:55AM +0200, Joerg Wunsch wrote:
> > Anton Berezin <[EMAIL PROTECTED]> wrote:
> > 
> > >           if (fork() == 0) {
> > > -                 signal(SIGCHLD, SIG_IGN);
> > > +                 signal(SIGCHLD, SIG_DFL);
> > 
> > This is unportable.
> > If you want automatic zombie reaping, better don't use the simplified
> > signal(3) handling, but instead spell it out as sigaction(2) using the
> > SA_NOCLDWAIT flag.  The above won't even give you a warning on systems
> > that don't implement automatic zombie reaping, while with sicaction,
> > you'll get a compile-time error for SA_NOCLDWAIT not being defined.
> Umm, I don't understand.  I do not want automatic zombie reaping, I want
> exactly the opposite, and my patch does just that.

I might be wrong in many ways, but...

is it then mandatory that you `reset' SIGCHLD to SIG_DFL ?

Why not leave it in it's default state, and make this patch:

-                       signal(SIGCHLD, SIG_IGN);

without adding any lines?

I'm in a wild rush, and I don't have the time to actually look at the code or
test it.  I will, soon, though...


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to