Subject: Re: make use sigaction instead of signal
To: Jeremy C. Reed <>
From: Simon Gerraty <>
List: tech-userlevel
Date: 10/04/2006 14:33:25
>Our bmake has been reported to not exit sub makes with CTRL-C 
>on Darwin, DragonFly and Linux. See PR pkg/31013.

>Their code now uses sigaction instead of signal to fix this.

So does bmake.  Hmm ok looks like it uses a mishmash of signal and
sigaction, though not an issue on NetBSD due to the implementatin
(IIRC), it is still bad form.

On other platforms sigcompat.c provides a signal() which maps to
sigaction, this is currently only used on SunOS I think.  See
you may need to -DFORCE_POSIX_SIGNALS  on systems other than SunOS.

FWIW, back when I was maintaining pdksh (long time ago ;-) I made it
always use sigaction - and provided a compat library that implemented
the sigaction api in terms of the best available sigvec, signal etc.  If
you want to work make over to only ever use sigaction, we can add some
more bits from that compat lib to support it.