blob: ed34841abb9bfdb1a5be5946198101c02dd8d19e (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
import Control.Concurrent
import System.Posix.Signals
main :: IO ()
main = do
_ <- flip (installHandler sig) Nothing $ Catch $
putStrLn $ "Received my signal"
raiseSignal sig
threadDelay 100000
where
sig = sigUSR2
|