Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Apr 2001 03:15:57 -0500
From:      Mike Meyer <mwm@mired.org>
To:        Lucas Bergman <lucas@slb.to>
Cc:        questions@freebsd.org
Subject:   Re: [OT] Reinstalling signal handler inside signal handler
Message-ID:  <15053.31549.888973.547913@guru.mired.org>
In-Reply-To: <127310561@toto.iv>

next in thread | previous in thread | raw e-mail | index | archive | help
Lucas Bergman <lucas@slb.to> types:
> > > 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.
> > 
> > Lucas, thanks for your answer.  For the record, it seems like Linux
> > does use the *BSD* sematics that you describe above.
> 
> I'll be damned.  The following code demonstrates that you're right:

Could this be one of the distributions differences? A distribution
could replace <signal.h> with an include (or symlink to)
<bsd/signal.h> to make the bsd behavior the default.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

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?15053.31549.888973.547913>