This file is indexed.

/usr/share/doc/libghc-pid1-doc/html/System-Process-PID1.html is in libghc-pid1-doc 0.1.2.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
<!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.Process.PID1</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script src="file:///usr/share/javascript/mathjax/MathJax.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_System-Process-PID1.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/System-Process-PID1.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">pid1-0.1.2.0: Do signal handling and orphan reaping for Unix PID1 init processes</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>Safe</td></tr><tr><th>Language</th><td>Haskell2010</td></tr></table><p class="caption">System.Process.PID1</p></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"><span class="keyword">data</span> <a href="#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:defaultRunOptions">defaultRunOptions</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:getRunEnv">getRunEnv</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)]</li><li class="src short"><a href="#v:getRunExitTimeoutSec">getRunExitTimeoutSec</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><a href="#v:getRunGroup">getRunGroup</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getRunUser">getRunUser</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:getRunWorkDir">getRunWorkDir</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></li><li class="src short"><a href="#v:run">run</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:runWithOptions">runWithOptions</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</li><li class="src short"><a href="#v:setRunEnv">setRunEnv</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:setRunExitTimeoutSec">setRunExitTimeoutSec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:setRunGroup">setRunGroup</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:setRunUser">setRunUser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li><li class="src short"><a href="#v:setRunWorkDir">setRunWorkDir</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">data</span> <a id="t:RunOptions" class="def">RunOptions</a> <a href="src/System-Process-PID1.html#RunOptions" class="link">Source</a> <a href="#t:RunOptions" class="selflink">#</a></p><div class="doc"><p>Holder for pid1 run options</p></div><div class="subs instances"><p id="control.i:RunOptions" class="caption collapser" onclick="toggleSection('i:RunOptions')">Instances</p><div id="section.i:RunOptions" class="show"><table><tr><td class="src clearfix"><span class="inst-left"><span id="control.i:id:RunOptions:Show:1" class="instance expander" onclick="toggleSection('i:id:RunOptions:Show:1')"></span> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:Show">Show</a> <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></span> <a href="src/System-Process-PID1.html#line-55" class="link">Source</a> <a href="#t:RunOptions" class="selflink">#</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div id="section.i:id:RunOptions:Show:1" class="inst-details hide"><div class="subs methods"><p class="caption">Methods</p><p class="src"><a href="#v:showsPrec">showsPrec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showsPrec" class="selflink">#</a></p><p class="src"><a href="#v:show">show</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="#v:show" class="selflink">#</a></p><p class="src"><a href="#v:showList">showList</a> :: [<a href="System-Process-PID1.html#t:RunOptions">RunOptions</a>] -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Text-Show.html#t:ShowS">ShowS</a> <a href="#v:showList" class="selflink">#</a></p></div></div></td></tr></table></div></div></div><div class="top"><p class="src"><a id="v:defaultRunOptions" class="def">defaultRunOptions</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#defaultRunOptions" class="link">Source</a> <a href="#v:defaultRunOptions" class="selflink">#</a></p><div class="doc"><p>return default <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:getRunEnv" class="def">getRunEnv</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] <a href="src/System-Process-PID1.html#getRunEnv" class="link">Source</a> <a href="#v:getRunEnv" class="selflink">#</a></p><div class="doc"><p>Get environment variable overrides for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:getRunExitTimeoutSec" class="def">getRunExitTimeoutSec</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> <a href="src/System-Process-PID1.html#getRunExitTimeoutSec" class="link">Source</a> <a href="#v:getRunExitTimeoutSec" class="selflink">#</a></p><div class="doc"><p>Return the timeout (in seconds) timeout (in seconds) to wait for all child
 processes to exit after receiving SIGTERM or SIGINT signal</p><p><em>Since: 0.1.2.0</em></p></div></div><div class="top"><p class="src"><a id="v:getRunGroup" class="def">getRunGroup</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/System-Process-PID1.html#getRunGroup" class="link">Source</a> <a href="#v:getRunGroup" class="selflink">#</a></p><div class="doc"><p>Get the process <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.1/System-Posix-User.html#v:setGroupID">setGroupID</a></code> group for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:getRunUser" class="def">getRunUser</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> <a href="src/System-Process-PID1.html#getRunUser" class="link">Source</a> <a href="#v:getRunUser" class="selflink">#</a></p><div class="doc"><p>Get the process <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.1/System-Posix-User.html#v:setUserID">setUserID</a></code> user for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:getRunWorkDir" class="def">getRunWorkDir</a> :: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> <a href="src/System-Process-PID1.html#getRunWorkDir" class="link">Source</a> <a href="#v:getRunWorkDir" class="selflink">#</a></p><div class="doc"><p>Get the process current directory for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:run" class="def">run</a> <a href="src/System-Process-PID1.html#run" class="link">Source</a> <a href="#v:run" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>command to run</p></td></tr><tr><td class="src">-&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</td><td class="doc"><p>command line arguments</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Maybe.html#t:Maybe">Maybe</a> [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)]</td><td class="doc"><p>optional environment variable override, default is current env</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Run the given command with specified arguments, with optional environment
 variable override (default is to use the current process's environment).</p><p>This function will check if the current process has a process ID of 1. If it
 does, it will install signal handlers for SIGTERM and SIGINT, set up a loop
 to reap all orphans, spawn a child process, and when that child dies, kill
 all other processes (first with a SIGTERM and then a SIGKILL) and exit with
 the child's exit code.</p><p>If this process is not PID1, then it will simply <code>exec</code> the given command.</p><p>This function will never exit: it will always terminate your process, unless
 some exception is thrown.</p><p><em>Since: 0.1.0.0</em></p></div></div><div class="top"><p class="src"><a id="v:runWithOptions" class="def">runWithOptions</a> <a href="src/System-Process-PID1.html#runWithOptions" class="link">Source</a> <a href="#v:runWithOptions" class="selflink">#</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></td><td class="doc"><p>run options</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a></td><td class="doc"><p>command to run</p></td></tr><tr><td class="src">-&gt; [<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>]</td><td class="doc"><p>command line arguments</p></td></tr><tr><td class="src">-&gt; <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:IO">IO</a> a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Variant of <code><a href="System-Process-PID1.html#v:run">run</a></code> that runs a command, with optional environment posix
 user/group and working directory (default is to use the current process's
 user, group, environment, and current directory).</p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:setRunEnv" class="def">setRunEnv</a> :: [(<a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>, <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a>)] -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#setRunEnv" class="link">Source</a> <a href="#v:setRunEnv" class="selflink">#</a></p><div class="doc"><p>Set environment variable overrides for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:setRunExitTimeoutSec" class="def">setRunExitTimeoutSec</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#setRunExitTimeoutSec" class="link">Source</a> <a href="#v:setRunExitTimeoutSec" class="selflink">#</a></p><div class="doc"><p>Set the timeout in seconds for the process reaper to wait for all child
 processes to exit after receiving SIGTERM or SIGINT signal</p><p><em>Since: 0.1.2.0</em></p></div></div><div class="top"><p class="src"><a id="v:setRunGroup" class="def">setRunGroup</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#setRunGroup" class="link">Source</a> <a href="#v:setRunGroup" class="selflink">#</a></p><div class="doc"><p>Set the process <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.1/System-Posix-User.html#v:setGroupID">setGroupID</a></code> group for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:setRunUser" class="def">setRunUser</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/Data-String.html#t:String">String</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#setRunUser" class="link">Source</a> <a href="#v:setRunUser" class="selflink">#</a></p><div class="doc"><p>Set the process <code><a href="file:///usr/share/doc/ghc-doc/html/libraries/unix-2.7.2.1/System-Posix-User.html#v:setUserID">setUserID</a></code> user for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div><div class="top"><p class="src"><a id="v:setRunWorkDir" class="def">setRunWorkDir</a> :: <a href="file:///usr/share/doc/ghc-doc/html/libraries/base-4.9.1.0/System-IO.html#t:FilePath">FilePath</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> -&gt; <a href="System-Process-PID1.html#t:RunOptions">RunOptions</a> <a href="src/System-Process-PID1.html#setRunWorkDir" class="link">Source</a> <a href="#v:setRunWorkDir" class="selflink">#</a></p><div class="doc"><p>Set the process current directory for the given <code><a href="System-Process-PID1.html#t:RunOptions">RunOptions</a></code></p><p><em>Since: 0.1.1.0</em></p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.17.3</p></div></body></html>