Last active
March 22, 2016 15:00
-
-
Save fujimura/d204d864645160136bdc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import System.Posix.Signals | |
import Control.Concurrent | |
main :: IO () | |
main = do | |
m <- newEmptyMVar | |
installHandler sigKILL (Catch (putMVar m "Hi")) Nothing | |
installHandler keyboardSignal (Catch (putMVar m "Hi")) Nothing | |
takeMVar m >>= print |
Author
fujimura
commented
Mar 22, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment