Proposal: new signal-handling API

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Tue Jul 22 07:51:22 EDT 2008


On Mon, 2008-07-21 at 14:23 -0700, Bryan O'Sullivan wrote:
> On Sat, Jul 19, 2008 at 10:07 AM, Duncan Coutts
> <duncan.coutts at worc.ox.ac.uk> wrote:
> 
> > I do understand the desire for that. The downside of course is that a
> > lower level api has to be used very carefully to avoid breaking the
> > promises provided by the higher level api.
> 
> True.
> 
> > There is and it's not changed by Simon's proposal:
> >
> > awaitSignal :: Maybe SignalSet -> IO
> > ()
> 
> Actually, awaitSignal isn't the same as sigwaitinfo; the latter
> returns the siginfo_t for the received signal.

Ah, another good reason to rewrite awaitSignal in terms of
addSignalHandler. That's one of the new things with the internal
implementation in ghc; it now captures the whole siginfo_t structure
(and pushes it down an internal pipe) rather than just the signal
number.

Duncan



More information about the Libraries mailing list