Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Apr 2001 16:11:23 -0500
From:      Lucas Bergman <lucas@slb.to>
To:        Arcady Genkin <antipode@thpoon.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: [OT] Reinstalling signal handler inside signal handler
Message-ID:  <20010405161123.A18827@billygoat.slb.to>
In-Reply-To: <87d7ardw5s.fsf@tea.thpoon.com>; from antipode@thpoon.com on Thu, Apr 05, 2001 at 02:43:59PM -0400
References:  <87d7ardw5s.fsf@tea.thpoon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
> FreeBSD man page for signal(3) states that
> 
>     Unlike previous signal facilities, the handler func() remains
>     installed after a signal has been delivered.
> 
> What "previous" signal facilities is this referring to?  I've seen a
> lot of code where a signal handler function would re-install itself
> the first thing.  But I've tested, and that doesn't appear to be
> necessary at least on FreeBSD and Linux.

Signals on "traditional" systems (V7, System V) were reset to their
default behavior after they were raised, so the signal handler had to
reinstall itself if it was to persist.  BSD changed that; you have to
deliberately reset a signal's behavior (excuse the split infinitive).
Linux actually follows the old semantics, but you can include
<bsd/signal.h> instead of <signal.h> (or call __bsd_signal() instead
of signal()) to get the BSD semantics.  Confused yet?

Lucas

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




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