From owner-freebsd-current Thu Jul 12 14:11:33 2001 Delivered-To: freebsd-current@freebsd.org Received: from mailsrv.otenet.gr (mailsrv.otenet.gr [195.170.0.5]) by hub.freebsd.org (Postfix) with ESMTP id 897B837B407 for ; Thu, 12 Jul 2001 14:11:28 -0700 (PDT) (envelope-from keramida@ceid.upatras.gr) Received: from hades.hell.gr (patr530-a081.otenet.gr [212.205.215.81]) by mailsrv.otenet.gr (8.11.1/8.11.1) with ESMTP id f6CLAoe28502; Fri, 13 Jul 2001 00:10:50 +0300 (EEST) Received: (from charon@localhost) by hades.hell.gr (8.11.4/8.11.4) id f6CJeDa02346; Thu, 12 Jul 2001 22:40:13 +0300 (EEST) (envelope-from charon) To: Anton Berezin Cc: Joerg Wunsch , freebsd-current@FreeBSD.ORG Subject: Re: cannot print to remote printer References: <873d83pquy.wl@wilhelm.noname> <20010711214311.C2855@heechee.tobez.org> <200107120645.f6C6jtP45267@uriah.heep.sax.de> <20010712122148.B10960@heechee.tobez.org> From: Giorgos Keramidas Date: 12 Jul 2001 22:40:12 +0300 In-Reply-To: Anton Berezin's message of "Thu, 12 Jul 2001 12:21:48 +0200" Message-ID: <86k81eaqcj.fsf@hades.hell.gr> Lines: 34 X-Mailer: Gnus v5.7/Emacs 20.7 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Anton Berezin writes: > On Thu, Jul 12, 2001 at 08:45:55AM +0200, Joerg Wunsch wrote: > > Anton Berezin 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