Skip executeFile001 in threaded2 way
[packages/unix.git] / tests / signals002.hs
1 import System.Posix
2 import Control.Concurrent
3
4 -- !!! test blockSignals, raiseSignal, unblockSignals, getPendingSignals
5
6 main = do
7 blockSignals ( userDefinedSignal1 `addSignal` emptySignalSet )
8 raiseSignal userDefinedSignal1
9 set <- getPendingSignals
10 print (userDefinedSignal1 `inSignalSet` set)
11 m <- newEmptyMVar
12 installHandler userDefinedSignal1
13 (Catch (putStrLn "hello" >> putMVar m ())) Nothing
14 awaitSignal (Just emptySignalSet)
15 takeMVar m