Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 4211

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>System.Posix.Process.ByteString</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Posix-Process-ByteString.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">unix-2.5.1.1: POSIX functionality</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>non-portable (requires POSIX)</td></tr><tr><th>Stability</th><td>provisional</td></tr><tr><th>Maintainer</th><td>libraries@haskell.org</td></tr><tr><th>Safe Haskell</th><td>Trustworthy</td></tr></table><p class="caption">System.Posix.Process.ByteString</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Processes
</a><ul><li><a href="#g:2">Forking and executing
</a></li><li><a href="#g:3">Exiting
</a></li><li><a href="#g:4">Process environment
</a></li><li><a href="#g:5">Process groups
</a></li><li><a href="#g:6">Sessions
</a></li><li><a href="#g:7">Process times
</a></li><li><a href="#g:8">Scheduling priority
</a></li><li><a href="#g:9">Process status
</a></li><li><a href="#g:10">Deprecated
</a></li></ul></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>POSIX process support.  See also the System.Cmd and System.Process
 modules in the process package.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:forkProcess">forkProcess</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></li><li class="src short"><a href="#v:executeFile">executeFile</a> ::  <a href="System-Posix-ByteString-FilePath.html#t:RawFilePath">RawFilePath</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; [<a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>] -&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>)] -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:exitImmediately">exitImmediately</a> :: <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:getProcessID">getProcessID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></li><li class="src short"><a href="#v:getParentProcessID">getParentProcessID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></li><li class="src short"><a href="#v:getProcessGroupID">getProcessGroupID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></li><li class="src short"><a href="#v:getProcessGroupIDOf">getProcessGroupIDOf</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></li><li class="src short"><a href="#v:createProcessGroupFor">createProcessGroupFor</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></li><li class="src short"><a href="#v:joinProcessGroup">joinProcessGroup</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setProcessGroupIDOf">setProcessGroupIDOf</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:createSession">createSession</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:ProcessTimes">ProcessTimes</a>  = <a href="#v:ProcessTimes">ProcessTimes</a> {<ul class="subs"><li><a href="#v:elapsedTime">elapsedTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></li><li><a href="#v:userTime">userTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></li><li><a href="#v:systemTime">systemTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></li><li><a href="#v:childUserTime">childUserTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></li><li><a href="#v:childSystemTime">childSystemTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></li></ul>}</li><li class="src short"><a href="#v:getProcessTimes">getProcessTimes</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="System-Posix-Process-ByteString.html#t:ProcessTimes">ProcessTimes</a></li><li class="src short"><a href="#v:nice">nice</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:getProcessPriority">getProcessPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:getProcessGroupPriority">getProcessGroupPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:getUserPriority">getUserPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:UserID">UserID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:setProcessPriority">setProcessPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setProcessGroupPriority">setProcessGroupPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><a href="#v:setUserPriority">setUserPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:UserID">UserID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li><li class="src short"><span class="keyword">data</span>  <a href="#t:ProcessStatus">ProcessStatus</a> <ul class="subs"><li>= <a href="#v:Exited">Exited</a> <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a>  </li><li>| <a href="#v:Terminated">Terminated</a> <a href="../base-4.5.1.0/GHC-Conc-Signal.html#t:Signal">Signal</a>  </li><li>| <a href="#v:Stopped">Stopped</a> <a href="../base-4.5.1.0/GHC-Conc-Signal.html#t:Signal">Signal</a>  </li></ul></li><li class="src short"><a href="#v:getProcessStatus">getProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>)</li><li class="src short"><a href="#v:getAnyProcessStatus">getAnyProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a>, <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>))</li><li class="src short"><a href="#v:getGroupProcessStatus">getGroupProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a>, <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>))</li><li class="src short"><a href="#v:createProcessGroup">createProcessGroup</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></li><li class="src short"><a href="#v:setProcessGroupID">setProcessGroupID</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</li></ul></div><div id="interface"><h1 id="g:1">Processes
</h1><h2 id="g:2">Forking and executing
</h2><div class="top"><p class="src"><a name="v:forkProcess" class="def">forkProcess</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> () -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:forkProcess">forkProcess</a></code> corresponds to the POSIX <code>fork</code> system call.
The <code><a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a></code> action passed as an argument is executed in the child process; no other
threads will be copied to the child process.
On success, <code><a href="System-Posix-Process-ByteString.html#v:forkProcess">forkProcess</a></code> returns the child's <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></code> to the parent process;
in case of an error, an exception is thrown.
</p><p><code><a href="System-Posix-Process-ByteString.html#v:forkProcess">forkProcess</a></code> 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.
</p></div></div><div class="top"><p class="src"><a name="v:executeFile" class="def">executeFile</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="System-Posix-ByteString-FilePath.html#t:RawFilePath">RawFilePath</a></td><td class="doc"><p>Command
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a></td><td class="doc"><p>Search PATH?
</p></td></tr><tr><td class="src">-&gt; [<a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>]</td><td class="doc"><p>Arguments
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>, <a href="../bytestring-0.9.2.1/Data-ByteString.html#t:ByteString">ByteString</a>)]</td><td class="doc"><p>Environment
</p></td></tr><tr><td class="src">-&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:executeFile">executeFile</a></code> cmd args env</code> calls one of the
   <code>execv*</code> family, depending on whether or not the current
   PATH is to be searched for the command, and whether or not an
   environment is provided to supersede the process's current
   environment.  The basename (leading directory names suppressed) of
   the command is passed to <code>execv*</code> as <code>arg[0]</code>;
   the argument list passed to <code><a href="System-Posix-Process-ByteString.html#v:executeFile">executeFile</a></code> therefore 
   begins with <code>arg[1]</code>.
</p></div></div><h2 id="g:3">Exiting
</h2><div class="top"><p class="src"><a name="v:exitImmediately" class="def">exitImmediately</a> :: <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:exitImmediately">exitImmediately</a></code> status</code> calls <code>_exit</code> to terminate the process
   with the indicated exit <code>status</code>.
   The operation never returns.
</p></div></div><h2 id="g:4">Process environment
</h2><div class="top"><p class="src"><a name="v:getProcessID" class="def">getProcessID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:getProcessID">getProcessID</a></code> calls <code>getpid</code> to obtain the <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></code> for
   the current process.
</p></div></div><div class="top"><p class="src"><a name="v:getParentProcessID" class="def">getParentProcessID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:getProcessID">getProcessID</a></code> calls <code>getppid</code> to obtain the <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></code> for
   the parent of the current process.
</p></div></div><h2 id="g:5">Process groups
</h2><div class="top"><p class="src"><a name="v:getProcessGroupID" class="def">getProcessGroupID</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:getProcessGroupID">getProcessGroupID</a></code> calls <code>getpgrp</code> to obtain the
   <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></code> for the current process.
</p></div></div><div class="top"><p class="src"><a name="v:getProcessGroupIDOf" class="def">getProcessGroupIDOf</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:getProcessGroupIDOf">getProcessGroupIDOf</a></code> pid</code> calls <code>getpgid</code> to obtain the
   <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></code> for process <code>pid</code>.
</p></div></div><div class="top"><p class="src"><a name="v:createProcessGroupFor" class="def">createProcessGroupFor</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:createProcessGroupFor">createProcessGroupFor</a></code> pid</code> calls <code>setpgid</code> to make
   process <code>pid</code> a new process group leader.
</p></div></div><div class="top"><p class="src"><a name="v:joinProcessGroup" class="def">joinProcessGroup</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:joinProcessGroup">joinProcessGroup</a></code> pgid</code> calls <code>setpgid</code> to set the
   <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></code> of the current process to <code>pgid</code>.
</p></div></div><div class="top"><p class="src"><a name="v:setProcessGroupIDOf" class="def">setProcessGroupIDOf</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:setProcessGroupIDOf">setProcessGroupIDOf</a></code> pid pgid</code> calls <code>setpgid</code> to set the
   <code>ProcessGroupIDOf</code> for process <code>pid</code> to <code>pgid</code>.
</p></div></div><h2 id="g:6">Sessions
</h2><div class="top"><p class="src"><a name="v:createSession" class="def">createSession</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:createSession">createSession</a></code> calls <code>setsid</code> to create a new session
   with the current process as session leader.
</p></div></div><h2 id="g:7">Process times
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ProcessTimes" class="def">ProcessTimes</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ProcessTimes" class="def">ProcessTimes</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:elapsedTime" class="def">elapsedTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:userTime" class="def">userTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:systemTime" class="def">systemTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:childUserTime" class="def">childUserTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></dt><dd class="doc empty">&nbsp;</dd><dt class="src"><a name="v:childSystemTime" class="def">childSystemTime</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ClockTick">ClockTick</a></dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><a name="v:getProcessTimes" class="def">getProcessTimes</a> :: <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="System-Posix-Process-ByteString.html#t:ProcessTimes">ProcessTimes</a></p><div class="doc"><p><code><a href="System-Posix-Process-ByteString.html#v:getProcessTimes">getProcessTimes</a></code> calls <code>times</code> to obtain time-accounting
   information for the current process and its children.
</p></div></div><h2 id="g:8">Scheduling priority
</h2><div class="top"><p class="src"><a name="v:nice" class="def">nice</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:getProcessPriority" class="def">getProcessPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:getProcessGroupPriority" class="def">getProcessGroupPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:getUserPriority" class="def">getUserPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:UserID">UserID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></p></div><div class="top"><p class="src"><a name="v:setProcessPriority" class="def">setProcessPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:setProcessGroupPriority" class="def">setProcessGroupPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><div class="top"><p class="src"><a name="v:setUserPriority" class="def">setUserPriority</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:UserID">UserID</a> -&gt; <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p></div><h2 id="g:9">Process status
</h2><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:ProcessStatus" class="def">ProcessStatus</a>  </p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Exited" class="def">Exited</a> <a href="../base-4.5.1.0/System-Exit.html#t:ExitCode">ExitCode</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Terminated" class="def">Terminated</a> <a href="../base-4.5.1.0/GHC-Conc-Signal.html#t:Signal">Signal</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Stopped" class="def">Stopped</a> <a href="../base-4.5.1.0/GHC-Conc-Signal.html#t:Signal">Signal</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:ProcessStatus" class="caption collapser" onclick="toggleSection('i:ProcessStatus')">Instances</p><div id="section.i:ProcessStatus" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:getProcessStatus" class="def">getProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>)</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:getProcessStatus">getProcessStatus</a></code> blk stopped pid</code> calls <code>waitpid</code>, returning
   <code><code><a href="../base-4.5.1.0/Data-Maybe.html#v:Just">Just</a></code> tc</code>, the <code><a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></code> for process <code>pid</code> if it is
   available, <code><a href="../base-4.5.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> otherwise.  If <code>blk</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:False">False</a></code>, then
   <code>WNOHANG</code> is set in the options for <code>waitpid</code>, otherwise not.
   If <code>stopped</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:True">True</a></code>, then <code>WUNTRACED</code> is set in the
   options for <code>waitpid</code>, otherwise not.
</p></div></div><div class="top"><p class="src"><a name="v:getAnyProcessStatus" class="def">getAnyProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a>, <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>))</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:getAnyProcessStatus">getAnyProcessStatus</a></code> blk stopped</code> calls <code>waitpid</code>, returning
   <code><code><a href="../base-4.5.1.0/Data-Maybe.html#v:Just">Just</a></code> (pid, tc)</code>, the <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></code> and <code><a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></code> for any
   child process if a child process has exited, or <code><a href="../base-4.5.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code> if
   there are child processes but none have exited.  If there are no
   child processes, then <code><a href="System-Posix-Process-ByteString.html#v:getAnyProcessStatus">getAnyProcessStatus</a></code> raises an
   <code>isDoesNotExistError</code> exception.
</p><p>If <code>blk</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:False">False</a></code>, then <code>WNOHANG</code> is set in the options for
   <code>waitpid</code>, otherwise not.  If <code>stopped</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:True">True</a></code>, then
   <code>WUNTRACED</code> is set in the options for <code>waitpid</code>, otherwise not.
</p></div></div><div class="top"><p class="src"><a name="v:getGroupProcessStatus" class="def">getGroupProcessStatus</a> :: <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a>, <a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a>))</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:getGroupProcessStatus">getGroupProcessStatus</a></code> blk stopped pgid</code> calls <code>waitpid</code>,
   returning <code><code><a href="../base-4.5.1.0/Data-Maybe.html#v:Just">Just</a></code> (pid, tc)</code>, the <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a></code> and <code><a href="System-Posix-Process-ByteString.html#t:ProcessStatus">ProcessStatus</a></code>
   for any process in group <code>pgid</code> if one is available, or <code><a href="../base-4.5.1.0/Data-Maybe.html#v:Nothing">Nothing</a></code>
   if there are child processes but none have exited.  If there are
   no child processes, then <code><a href="System-Posix-Process-ByteString.html#v:getGroupProcessStatus">getGroupProcessStatus</a></code> raises an
   <code>isDoesNotExistError</code> exception.
</p><p>If <code>blk</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:False">False</a></code>, then <code>WNOHANG</code> is set in the options for
   <code>waitpid</code>, otherwise not.  If <code>stopped</code> is <code><a href="../base-4.5.1.0/Data-Bool.html#v:True">True</a></code>, then
   <code>WUNTRACED</code> is set in the options for <code>waitpid</code>, otherwise not.
</p></div></div><h2 id="g:10">Deprecated
</h2><div class="top"><p class="src"><a name="v:createProcessGroup" class="def">createProcessGroup</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:createProcessGroup">createProcessGroup</a></code> pid</code> calls <code>setpgid</code> to make
   process <code>pid</code> a new process group leader.
   This function is currently deprecated,
   and might be changed to making the current
   process a new process group leader in future versions.
</p></div></div><div class="top"><p class="src"><a name="v:setProcessGroupID" class="def">setProcessGroupID</a> :: <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessID">ProcessID</a> -&gt; <a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a> -&gt; <a href="../base-4.5.1.0/System-IO.html#t:IO">IO</a> ()</p><div class="doc"><p><code><code><a href="System-Posix-Process-ByteString.html#v:setProcessGroupID">setProcessGroupID</a></code> pid pgid</code> calls <code>setpgid</code> to set the
   <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></code> for process <code>pid</code> to <code>pgid</code>.
   This function is currently deprecated,
   and might be changed to setting the <code><a href="../base-4.5.1.0/System-Posix-Types.html#t:ProcessGroupID">ProcessGroupID</a></code>
   for the current process in future versions.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>