Idris2/tests/base/system_signal003/DefaultSignal.idr

14 lines
431 B
Idris
Raw Normal View History

2021-05-25 18:45:46 +03:00
import System.Signal
import System
main : IO ()
main = do
Right () <- ignoreSignal SigABRT
| Left (Error code) => putStrLn $ "error " ++ (show code)
Right () <- defaultSignal SigABRT
| Left (Error code) => putStrLn $ "error " ++ (show code)
Right () <- raiseSignal SigABRT
| Left (Error code) => putStrLn $ "received non-zero exit from system call: " ++ (show code)
sleep 1
putStrLn "(should not get here)."