Skip to content

Instantly share code, notes, and snippets.

@smly
Created December 29, 2008 15:53
Show Gist options
  • Save smly/41294 to your computer and use it in GitHub Desktop.
Save smly/41294 to your computer and use it in GitHub Desktop.
import System.Posix.Unistd
import System.Posix.Signals
import System.Exit
main = do
let exit0 = exitWith ExitSuccess
let exit1 = exitWith (ExitFailure 1)
installHandler sigINT (Catch exit1) Nothing
sleep 1000000
exit0
{-
result:
http://gyazo.com/f454e3d519c1ff7170d5cb824afc4edd.png
-}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment