Skip site navigation (1)Skip section navigation (2)
Date:      12 Jul 2001 22:40:12 +0300
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Anton Berezin <tobez@tobez.org>
Cc:        Joerg Wunsch <joerg_wunsch@uriah.heep.sax.de>, freebsd-current@FreeBSD.ORG
Subject:   Re: cannot print to remote printer
Message-ID:  <86k81eaqcj.fsf@hades.hell.gr>
In-Reply-To: Anton Berezin's message of "Thu, 12 Jul 2001 12:21:48 %2B0200"
References:  <lth8zikptx0.wl@hunter.munich.sgi.com> <p05101003b759266483c2@> <p05101003b759266483c2@[128.113.24.47]> <873d83pquy.wl@wilhelm.noname> <20010711214311.C2855@heechee.tobez.org> <200107120645.f6C6jtP45267@uriah.heep.sax.de> <20010712122148.B10960@heechee.tobez.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Anton Berezin <tobez@tobez.org> writes:

> On Thu, Jul 12, 2001 at 08:45:55AM +0200, Joerg Wunsch wrote:
> > Anton Berezin <tobez@FreeBSD.ORG> 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...

-giorgos

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86k81eaqcj.fsf>