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 solution.
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)

--
http://wagerlabs.com/





_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to