Treating POSIX signals as exceptions?

David Roundy droundy at
Tue Nov 11 11:01:49 EST 2003

On Tue, Nov 11, 2003 at 04:49:29PM +0100, Marcin 'Qrczak' Kowalczyk wrote:
> On, 10-11-2003, at 16:41, David Roundy wrote:
> > I was wondering why System.Posix.Signals is as it is, and whether it could
> > be rewritten to use exceptions, which seems like the obvious way to handle
> > signals.
> I don't understand. How to handle a signal using exceptions such that
> the signal doesn't abort the execution up to the nearest established
> handler?

That's precisely what it would do (which seems better than simply aborting
execution...).  If you don't want that behavior, you would forkIO a thread
to receive the exceptions.
David Roundy

More information about the Haskell-Cafe mailing list