Process module:System package:unix

POSIX process support. See also the System.Cmd and System.Process modules in the process package.
The exit status of a process
Deprecated: This function is scheduled to be replaced by something different in the future, we therefore recommend that you do not use this version and use createProcessGroupFor instead.
createProcessGroupFor pid calls setpgid to make process pid a new process group leader.
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. The exception masking state of the executed action is inherited (c.f. forkIO), see also forkProcessWithUnmask (since: 2.7.0.0). forkProcess comes with a giant warning: since any other running threads are not copied into the child process, it's easy to go wrong: e.g. by accessing some shared resource that was held by another thread in the parent.
Variant of forkProcess in the style of forkIOWithUnmask.
getAnyProcessStatus blk stopped calls waitpid, returning Just (pid, tc), the ProcessID and ProcessStatus for any child process if a child process has exited, or Nothing if there are child processes but none have exited. If there are no child processes, then getAnyProcessStatus raises an isDoesNotExistError exception. If blk is False, then WNOHANG is set in the options for waitpid, otherwise not. If stopped is True, then WUNTRACED is set in the options for waitpid, otherwise not.
getGroupProcessStatus blk stopped pgid calls waitpid, returning Just (pid, tc), the ProcessID and ProcessStatus for any process in group pgid if one is available, or Nothing if there are child processes but none have exited. If there are no child processes, then getGroupProcessStatus raises an isDoesNotExistError exception. If blk is False, then WNOHANG is set in the options for waitpid, otherwise not. If stopped is True, then WUNTRACED is set in the options for waitpid, otherwise not.
getProcessID calls getppid to obtain the ProcessID for the parent of the current process.
getProcessGroupID calls getpgrp to obtain the ProcessGroupID for the current process.
getProcessGroupIDOf pid calls getpgid to obtain the ProcessGroupID for process pid.
getProcessID calls getpid to obtain the ProcessID for the current process.
getProcessStatus blk stopped pid calls waitpid, returning Just tc, the ProcessStatus for process pid if it is available, Nothing otherwise. If blk is False, then WNOHANG is set in the options for waitpid, otherwise not. If stopped is True, then WUNTRACED is set in the options for waitpid, otherwise not.
getProcessTimes calls times to obtain time-accounting information for the current process and its children.
joinProcessGroup pgid calls setpgid to set the ProcessGroupID of the current process to pgid.
Deprecated: This function is scheduled to be replaced by something different in the future, we therefore recommend that you do not use this version and use setProcessGroupIDOf instead.
setProcessGroupIDOf pid pgid calls setpgid to set the ProcessGroupIDOf for process pid to pgid.