From owner-freebsd-current Wed Jul 11 23:50:22 2001 Delivered-To: freebsd-current@freebsd.org Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by hub.freebsd.org (Postfix) with ESMTP id 94AA937B403 for ; Wed, 11 Jul 2001 23:50:15 -0700 (PDT) (envelope-from j@uriah.heep.sax.de) Received: (from uucp@localhost) by sax.sax.de (8.9.3/8.9.3) with UUCP id IAA27194 for freebsd-current@freebsd.org; Thu, 12 Jul 2001 08:50:14 +0200 (CEST) Received: (from j@localhost) by uriah.heep.sax.de (8.11.4/8.11.4) id f6C6jtP45267; Thu, 12 Jul 2001 08:45:55 +0200 (MET DST) (envelope-from j) Date: Thu, 12 Jul 2001 08:45:55 +0200 (MET DST) Message-Id: <200107120645.f6C6jtP45267@uriah.heep.sax.de> Mime-Version: 1.0 X-Newsreader: knews 1.0b.1 Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Organization: Private BSD site, Dresden X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E References: <873d83pquy.wl@wilhelm.noname> <20010711214311.C2855@heechee.tobez.org> From: j@uriah.heep.sax.de (Joerg Wunsch) Subject: Re: cannot print to remote printer X-Original-Newsgroups: local.freebsd.current To: freebsd-current@freebsd.org Content-Type: text/plain; charset=us-ascii 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 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. -- cheers, J"org .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message