[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] replace signal with sigaction

From: Alan Post
Subject: Re: [Chicken-users] replace signal with sigaction
Date: Thu, 29 Sep 2011 08:59:50 -0601

On Thu, Sep 29, 2011 at 10:44:42AM -0400, John Cowan wrote:
> Alan Post scripsit:
> > It used to be one tested for sigaction in the same way you might
> > test for other features.  I'm not sure if chicken runs on a
> > platform that doesn't have sigaction--do I need to add a feature
> > test for this and preserve the existing capability on platforms
> > without sigaction?
> Win32 systems (not including Cygwin) have signal() but not sigaction().
> The only signals on Win32 are SIGABRT, SIGFPE, and SIGSEGV.  SIGILL and
> SIGTERM can be trapped, but they can only happen if you raise them
> yourself with raise().  SIGINT can also be trapped, but that's a bad
> idea, because the handler will be run on a separate Win32 thread.
> All of our other hosts implement sigaction().

I'm very happy you had this information to hand--I had not quite
remembered how the signal() interface survived C ANSI-fication
and you just laid it out for me.

Does the ANSI C behavior specify that a signal must be re-registered
after it is called?  Is it more reliable for me to follow the ANSI
C standard or the w32 documentation on this interface?  If w32,
where do I find that?

I will submit a new patch that includes a feature test so this code
will work on w32.

.i.ioki'edo mu'o mi'e .alyn.
.i ma'a lo bradi cu penmi gi'e du

reply via email to

[Prev in Thread] Current Thread [Next in Thread]