Install toplevel handler inside fork.
[ghc.git] / testsuite / tests / rts / T12903.hs
1 import Control.Concurrent
2 import Control.Exception
3 import System.Posix
4
5 main = do
6 pid <- forkProcess $ do
7 handle (\UserInterrupt{} -> putStrLn "caught")
8 $ threadDelay 2000000
9 signalProcess sigINT pid
10 threadDelay 2000000