Haskell Core Libraries (base package)ParentContentsIndex
System.Posix.Signals
Portability non-portable (requires POSIX)
Stability provisional
Maintainer libraries@haskell.org
Contents
The Signal type
Specific signals
Sending signals
Handling signals
Signal sets
The process signal mask
The alarm timer
Waiting for signals
Description
POSIX signal support
Synopsis
type Signal = CInt
nullSignal :: Signal
internalAbort :: Signal
sigABRT :: CInt
realTimeAlarm :: Signal
sigALRM :: CInt
busError :: Signal
sigBUS :: CInt
processStatusChanged :: Signal
sigCHLD :: CInt
continueProcess :: Signal
sigCONT :: CInt
floatingPointException :: Signal
sigFPE :: CInt
lostConnection :: Signal
sigHUP :: CInt
illegalInstruction :: Signal
sigILL :: CInt
keyboardSignal :: Signal
sigINT :: CInt
killProcess :: Signal
sigKILL :: CInt
openEndedPipe :: Signal
sigPIPE :: CInt
keyboardTermination :: Signal
sigQUIT :: CInt
segmentationViolation :: Signal
sigSEGV :: CInt
softwareStop :: Signal
sigSTOP :: CInt
softwareTermination :: Signal
sigTERM :: CInt
keyboardStop :: Signal
sigTSTP :: CInt
backgroundRead :: Signal
sigTTIN :: CInt
backgroundWrite :: Signal
sigTTOU :: CInt
userDefinedSignal1 :: Signal
sigUSR1 :: CInt
userDefinedSignal2 :: Signal
sigUSR2 :: CInt
pollableEvent :: Signal
sigPOLL :: CInt
profilingTimerExpired :: Signal
sigPROF :: CInt
badSystemCall :: Signal
sigSYS :: CInt
breakpointTrap :: Signal
sigTRAP :: CInt
urgentDataAvailable :: Signal
sigURG :: CInt
virtualTimerExpired :: Signal
sigVTALRM :: CInt
cpuTimeLimitExceeded :: Signal
sigXCPU :: CInt
fileSizeLimitExceeded :: Signal
sigXFSZ :: CInt
raiseSignal :: Signal -> IO ()
signalProcess :: Signal -> ProcessID -> IO ()
signalProcessGroup :: Signal -> ProcessGroupID -> IO ()
data Handler
= Default
| Ignore
| Catch (IO ())
| CatchOnce (IO ())
installHandler :: Signal -> Handler -> Maybe SignalSet -> IO Handler
data SignalSet
emptySignalSet :: SignalSet
fullSignalSet :: SignalSet
addSignal :: Signal -> SignalSet -> SignalSet
deleteSignal :: Signal -> SignalSet -> SignalSet
inSignalSet :: Signal -> SignalSet -> Bool
getSignalMask :: IO SignalSet
setSignalMask :: SignalSet -> IO ()
blockSignals :: SignalSet -> IO ()
unblockSignals :: SignalSet -> IO ()
scheduleAlarm :: Int -> IO Int
getPendingSignals :: IO SignalSet
awaitSignal :: Maybe SignalSet -> IO ()
The Signal type
type Signal = CInt
Specific signals
nullSignal :: Signal
internalAbort :: Signal
sigABRT :: CInt
realTimeAlarm :: Signal
sigALRM :: CInt
busError :: Signal
sigBUS :: CInt
processStatusChanged :: Signal
sigCHLD :: CInt
continueProcess :: Signal
sigCONT :: CInt
floatingPointException :: Signal
sigFPE :: CInt
lostConnection :: Signal
sigHUP :: CInt
illegalInstruction :: Signal
sigILL :: CInt
keyboardSignal :: Signal
sigINT :: CInt
killProcess :: Signal
sigKILL :: CInt
openEndedPipe :: Signal
sigPIPE :: CInt
keyboardTermination :: Signal
sigQUIT :: CInt
segmentationViolation :: Signal
sigSEGV :: CInt
softwareStop :: Signal
sigSTOP :: CInt
softwareTermination :: Signal
sigTERM :: CInt
keyboardStop :: Signal
sigTSTP :: CInt
backgroundRead :: Signal
sigTTIN :: CInt
backgroundWrite :: Signal
sigTTOU :: CInt
userDefinedSignal1 :: Signal
sigUSR1 :: CInt
userDefinedSignal2 :: Signal
sigUSR2 :: CInt
pollableEvent :: Signal
sigPOLL :: CInt
profilingTimerExpired :: Signal
sigPROF :: CInt
badSystemCall :: Signal
sigSYS :: CInt
breakpointTrap :: Signal
sigTRAP :: CInt
urgentDataAvailable :: Signal
sigURG :: CInt
virtualTimerExpired :: Signal
sigVTALRM :: CInt
cpuTimeLimitExceeded :: Signal
sigXCPU :: CInt
fileSizeLimitExceeded :: Signal
sigXFSZ :: CInt
Sending signals
raiseSignal :: Signal -> IO ()
signalProcess :: Signal -> ProcessID -> IO ()
signalProcessGroup :: Signal -> ProcessGroupID -> IO ()
Handling signals
data Handler
Constructors
Default
Ignore
Catch (IO ())
CatchOnce (IO ())
installHandler :: Signal -> Handler -> Maybe SignalSet -> IO Handler
Signal sets
data SignalSet
emptySignalSet :: SignalSet
fullSignalSet :: SignalSet
addSignal :: Signal -> SignalSet -> SignalSet
deleteSignal :: Signal -> SignalSet -> SignalSet
inSignalSet :: Signal -> SignalSet -> Bool
The process signal mask
getSignalMask :: IO SignalSet
setSignalMask :: SignalSet -> IO ()
blockSignals :: SignalSet -> IO ()
unblockSignals :: SignalSet -> IO ()
The alarm timer
scheduleAlarm :: Int -> IO Int
Waiting for signals
getPendingSignals :: IO SignalSet
awaitSignal :: Maybe SignalSet -> IO ()
Produced by Haddock version 0.4