Safe Haskell | None |
---|
This module provides a thin portability layer for handling user interrupts.
The reason is that in the standard Haskell library, this functionality is only available in operating system specific modules, namely System.Posix.Signals (for POSIX systems, including Linux) and GHC.ConsoleHandler (for Windows).
Note that despite this compatibility layer, there are some operating system specific quirks:
- In Windows, console events (such as Control-C) can only be
received by an application running in a Windows console. Certain
environments that look like consoles do not support console events,
such as xterm and rxvt windows, and Cygwin shells with
CYGWIN=tty
set. - In Windows, setting a handler for any one signal automatically
overrides the handlers for all signals (effectively ignoring them).
Also, if the
Default
orIgnore
handler is specified, it applies to all signals. We do not currently provide a way to specify handlers for multiple signals.