#2451: New signal-handling API
---------------------------------+------------------------------------------
Reporter: simonmar | Owner: simonmar
Type: proposal | Status: new
Priority: high | Milestone: 6.14 branch
Component: libraries/unix | Version: 6.8.3
Keywords: | Difficulty: Unknown
Os: Unknown/Multiple | Testcase:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Changes (by simonmar):
* failure: => None/Unknown
Old description:
> The current API for handling signals in `System.Posix` is lacking in a
> couple of ways:
>
> * it isn't modular: there's no way for a library to install a private
> signal handler,
> there is only a singla global handler per signal.
>
> * it isn't possible to get hold of the information from `siginfo_t`
> (#592).
>
> I want to propose a new API. This has already undergone a round of
> changes after discussion with Duncan Coutts, and we ended up with
> something quite simple. Haddock docs are here:
>
> [http://darcs.haskell.org/~simonmar/unix/System-Posix-Signals.html#4]
>
> (also attached as `unix-html.tar.gz`).
>
> I have working patches to implement this. The old API is still
> available, and is reimplemented using the new API. Signal handlers
> installed using the old API will coexist with those installed using the
> new API.
>
> The main motivation for this change was so that I could hook the
> `SIGCHLD` signal in the `System.Process` library without disturbing users
> of the `System.Posix` library who might also want to install a `SIGCHLD`
> handler.
>
> Deadline: 1 Aug (2 weeks)
New description:
The current API for handling signals in `System.Posix` is lacking in a
couple of ways:
* it isn't modular: there's no way for a library to install a private
signal handler,
there is only a singla global handler per signal.
* it isn't possible to get hold of the information from `siginfo_t`
(#592).
I want to propose a new API. This has already undergone a round of
changes after discussion with Duncan Coutts, and we ended up with
something quite simple. Haddock docs are here:
[http://www.haskell.org/~simonmar/unix/System-Posix-Signals.html#4]
(also attached as `unix-html.tar.gz`).
I have working patches to implement this. The old API is still available,
and is reimplemented using the new API. Signal handlers installed using
the old API will coexist with those installed using the new API.
The main motivation for this change was so that I could hook the `SIGCHLD`
signal in the `System.Process` library without disturbing users of the
`System.Posix` library who might also want to install a `SIGCHLD` handler.
Deadline: 1 Aug (2 weeks)
--
Comment:
Fixed URL to haddock docs in description.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2451#comment:12>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs