Haskell Hierarchical Libraries (unix package)ContentsIndex
System.Posix.Process
Portability non-portable (requires POSIX)
Stability provisional
Maintainer libraries@haskell.org
Contents
Processes
Forking and executing
Exiting
Process environment
Process groups
Sessions
Process times
Scheduling priority
Process status
Description
POSIX process support
Synopsis
forkProcess :: IO () -> IO ProcessID
executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO ()
exitImmediately :: ExitCode -> IO ()
getProcessID :: IO ProcessID
getParentProcessID :: IO ProcessID
getProcessGroupID :: IO ProcessGroupID
createProcessGroup :: ProcessID -> IO ProcessGroupID
joinProcessGroup :: ProcessGroupID -> IO ()
setProcessGroupID :: ProcessID -> ProcessGroupID -> IO ()
createSession :: IO ProcessGroupID
data ProcessTimes = ProcessTimes {
elapsedTime :: ClockTick
userTime :: ClockTick
systemTime :: ClockTick
childUserTime :: ClockTick
childSystemTime :: ClockTick
}
getProcessTimes :: IO ProcessTimes
nice :: Int -> IO ()
getProcessPriority :: ProcessID -> IO Int
getProcessGroupPriority :: ProcessGroupID -> IO Int
getUserPriority :: UserID -> IO Int
setProcessPriority :: ProcessID -> Int -> IO ()
setProcessGroupPriority :: ProcessGroupID -> Int -> IO ()
setUserPriority :: UserID -> Int -> IO ()
data ProcessStatus
= Exited ExitCode
| Terminated Signal
| Stopped Signal
getProcessStatus :: Bool -> Bool -> ProcessID -> IO (Maybe ProcessStatus)
getAnyProcessStatus :: Bool -> Bool -> IO (Maybe (ProcessID, ProcessStatus))
getGroupProcessStatus :: Bool -> Bool -> ProcessGroupID -> IO (Maybe (ProcessID, ProcessStatus))
Processes
Forking and executing
forkProcess :: IO () -> IO ProcessID
forkProcess corresponds to the POSIX fork system call. The IO action passed as an argument is executed in the child process; no other threads will be copied to the child process. On success, forkProcess returns the child's ProcessID to the parent process; in case of an error, an exception is thrown.
executeFile :: FilePath -> Bool -> [String] -> Maybe [(String, String)] -> IO ()
Exiting
exitImmediately :: ExitCode -> IO ()
Process environment
getProcessID :: IO ProcessID
getParentProcessID :: IO ProcessID
getProcessGroupID :: IO ProcessGroupID
Process groups
createProcessGroup :: ProcessID -> IO ProcessGroupID
joinProcessGroup :: ProcessGroupID -> IO ()
setProcessGroupID :: ProcessID -> ProcessGroupID -> IO ()
Sessions
createSession :: IO ProcessGroupID
Process times
data ProcessTimes
Constructors
ProcessTimes
elapsedTime :: ClockTick
userTime :: ClockTick
systemTime :: ClockTick
childUserTime :: ClockTick
childSystemTime :: ClockTick
getProcessTimes :: IO ProcessTimes
Scheduling priority
nice :: Int -> IO ()
getProcessPriority :: ProcessID -> IO Int
getProcessGroupPriority :: ProcessGroupID -> IO Int
getUserPriority :: UserID -> IO Int
setProcessPriority :: ProcessID -> Int -> IO ()
setProcessGroupPriority :: ProcessGroupID -> Int -> IO ()
setUserPriority :: UserID -> Int -> IO ()
Process status
data ProcessStatus
Constructors
Exited ExitCode
Terminated Signal
Stopped Signal
Instances
Eq ProcessStatus
Ord ProcessStatus
Show ProcessStatus
getProcessStatus :: Bool -> Bool -> ProcessID -> IO (Maybe ProcessStatus)
getAnyProcessStatus :: Bool -> Bool -> IO (Maybe (ProcessID, ProcessStatus))
getGroupProcessStatus :: Bool -> Bool -> ProcessGroupID -> IO (Maybe (ProcessID, ProcessStatus))
Produced by Haddock version 0.6