Date: Fri, 6 Nov 2009 18:34:11 -0800 (PST) From: Nate Eldredge <nate@thatsmathematics.com> To: Alexander Best <alexbestms@math.uni-muenster.de> Cc: freebsd-hackers@freebsd.org, Jilles Tjoelker <jilles@stack.nl> Subject: Re: SIGUNUSED Message-ID: <Pine.GSO.4.64.0911061833080.5432@zeno.ucsd.edu> In-Reply-To: <permail-2009110702174980e26a0b00004745-a_best01@message-id.uni-muenster.de> References: <permail-2009110702174980e26a0b00004745-a_best01@message-id.uni-muenster.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 7 Nov 2009, Alexander Best wrote: > Jilles Tjoelker schrieb am 2009-11-06: >> On Fri, Nov 06, 2009 at 10:33:57PM +0100, Alexander Best wrote: >>> some programmers tend to do the following in their apps to install >>> a standard >>> handler for all signals (mostly SIG_IGN): > >>> int counter; > >>> for (counter = 1; counter < SIGUNUSED; counter++) >>> signal(counter, SIG_IGN); >> That code is wrong, SIGUNUSED is not meant to be used in that way. It >> seems to originate from Linux, but it is not available on all >> architectures there, and where it is available it is a valid signal. > oh. i see. i'm not a linux user. that's why i thought SIGUNUSED was designed > exactly for that purpose. I think that's what NSIG was for. But it seems to be BSD-specific, and perhaps obsolecent. -- Nate Eldredge nate@thatsmathematics.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0911061833080.5432>