[Haskell-cafe] Retrieving the caught signal within a handler

Joel Reymont joelr1 at gmail.com
Tue Dec 6 12:25:37 EST 2005

Thanks Bulat! This is what I ended up doing before you posted.
Sometimes just the mere fact of asking makes you come up with a  
I use #haskell for that alot :-).

On Dec 6, 2005, at 4:17 PM, Bulat Ziganshin wrote:

> Hello Joel,
> Tuesday, December 06, 2005, 1:39:10 PM, you wrote:
> JR> Is there a way to retrieve the signal within the signal handler?
> JR> I would like to know the signal that I caught.
> just pass signal number to the handler you installs :)
>         installHandler sigPIPE Ignore Nothing
>         flip mapM_ [sigINT, sigHUP, sigABRT, sigTERM] $ \sig -> do
>           installHandler sig handler Nothing
>               where handler = Catch $ exitWith (ExitFailure 1)


More information about the Haskell-Cafe mailing list