autodoc.git / traditional.xml

version» Context lines:

autodoc.git/traditional.xml:1:   <?xml version='1.0' encoding='utf-8'?> - <manual time-stamp='2022-11-05' version='Pike v8.1.19'> + <manual time-stamp='2022-11-06' version='Pike v8.1.19'>    <dir name='./traditional_manual'>    <file name='./traditional_manual/index.html'>    <chapter title='Table of Contents' unnumbered='1'>    <dl><dt><url href='index.html'>Table of Contents</url></dt>   <dt><url href='chapter_1.html'>1. Introduction</url></dt>   <dd><url href='chapter_1.html#1.1'>1.1. Overview</url></dd>   <dd><url href='chapter_1.html#1.2'>1.2. The history of Pike</url></dd>   <dd><url href='chapter_1.html#1.3'>1.3. A comparison with other languages</url></dd>   <dd><url href='chapter_1.html#1.4'>1.4. What is Pike</url></dd>   <dd><url href='chapter_1.html#1.5'>1.5. Pike License</url></dd>
autodoc.git/traditional.xml:125977:   </text></doc>   <method name='write'>   <arguments><argument name='bytes'><type><string/></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup>   </class>   </module>      <module name='Process'> + <doc><text><p>Easy and lazy way of using <ref resolved='predef::Process.Process'>Process.Process</ref> that runs a process +  and returns a mapping with the output and exit code without +  having to make sure you read nonblocking yourself.</p> + </text><group><text><p>Either a command line array, as the command_args +  argument to <ref resolved='predef::Process.create_process'>create_process()</ref>, or a string that +  will be splitted into a command line array by +  calling <ref resolved='predef::Process.split_quoted_string'>split_quoted_string()</ref> in an operating +  system dependant mode.</p> + </text></group><group><text><p>It takes all the modifiers <ref resolved='predef::Process.Process'>Process.Process</ref> accepts, with +  the exception of stdout and stderr. Each must be either absent, or +  a function accepting a string; if present, the functions will be called +  whenever output is made on the corresponding stream, otherwise the data +  will be collected and returned in the result mapping.</p> + <p> If <expr>modifiers-&gt;stdin</expr> is set to a string it will automatically be +  converted to a pipe that is fed to stdin of the started process.</p> + </text></group><group><seealso/><text><p><ref resolved='predef::Process.Process'>Process.Process</ref> <ref resolved='predef::Process.create_process'>create_process</ref></p> + </text></group><group><text><mapping><group><member><type><string/></type><index>"stdout"</index></member><text><p>Everything the process wrote on stdout, unless a stdout function was +  provided.</p> + </text></group><group><member><type><string/></type><index>"stderr"</index></member><text><p>Everything the process wrote on stderr, similarly.</p> + </text></group><group><member><type><int/></type><index>"exitcode"</index></member><text><p>The process' exitcode.</p> + </text></group></mapping> + </text></group><group><note/><text><p>As the entire output of stderr and stdout is stored in the +  returned mapping it could potentially grow until memory runs out. +  It is therefore advisable to set up rlimits if the output has a +  potential to be very large, or else provide functions to handle +  partial data.</p> + </text></group><group><example/><text><p>Process.run( ({ "ls", "-l" }) ); +  Process.run( ({ "ls", "-l" }), ([ "cwd":"/etc" ]) ); +  Process.run( "ls -l" ); +  Process.run( "awk -F: '{print $2}'", ([ "stdin":"foo:2\nbar:17\n" ]) ); +  Process.run( ({ "echo Output will be immediately written to stdour" }), +  ([ "stdout": lambda(string s) { write(s); }, +  "stderr": lambda(string e) { werror(e); } ]) );</p> + </text></group></doc>   <docgroup homogen-name='daemon' homogen-type='method'><doc><text><p>A function to run current program in the background.</p>   </text><group><param name='nochdir'/><text><p>If 0 the process will continue to run in / or the directory    dictadet by modifiers.</p>   </text></group><group><param name='noclose'/><text><p>If this is not 0 the process will keep current file descriptors    open.</p>   </text></group><group><param name='modifiers'/><text><p>Optional extra arguments. The parameters passed in this mapping    will override the arguments nochdir and noclose.</p>   <mapping><group><member><type><string/></type><index>"cwd"</index></member><text><p>Change current working directory to this directory.</p>   </text></group><group><member><type><or><string/><object resolved='predef::Stdio.File'>Stdio.File</object></or></type><index>"stdin"</index></member><text><p>If this is a string this will be interpreted as a filename    pointing out a file to be used as stdandard input to the process.
autodoc.git/traditional.xml:126056:   </text></group><group><value>"w"</value><text><p>Open for writing. Data written to the file is available    to the process on stdin.</p>   </text></group></string>   </text><group><seealso/><text><p><ref resolved='predef::Process.system'>system</ref>, <ref resolved='predef::Process.spawn'>spawn</ref></p>   </text></group></doc>   <method name='popen'>   <arguments><argument name='command'><type><string/></type></argument><argument name='mode'><type><string/></type></argument></arguments>   <returntype><object resolved='predef::Stdio.FILE'>Stdio.FILE</object></returntype>   </method>   </docgroup> - <docgroup homogen-name='run' homogen-type='method'><doc><text><p>Easy and lazy way of using <ref resolved='predef::Process.Process'>Process.Process</ref> that runs a process -  and returns a mapping with the output and exit code without -  having to make sure you read nonblocking yourself.</p> - </text><group><param name='args'/><text><p>Either a command line array, as the command_args -  argument to <ref resolved='predef::Process.create_process'>create_process()</ref>, or a string that -  will be splitted into a command line array by -  calling <ref resolved='predef::Process.split_quoted_string'>split_quoted_string()</ref> in an operating -  system dependant mode.</p> - </text></group><group><param name='modifiers'/><text><p>It takes all the modifiers <ref resolved='predef::Process.Process'>Process.Process</ref> accepts, with -  the exception of stdout and stderr. Each must be either absent, or -  a function accepting a string; if present, the functions will be called -  whenever output is made on the corresponding stream, otherwise the data -  will be collected and returned in the result mapping.</p> - <p> If <expr>modifiers-&gt;stdin</expr> is set to a string it will automatically be -  converted to a pipe that is fed to stdin of the started process.</p> - </text></group><group><seealso/><text><p><ref resolved='predef::Process.Process'>Process.Process</ref> <ref resolved='predef::Process.create_process'>create_process</ref></p> - </text></group><group><returns/><text><mapping><group><member><type><string/></type><index>"stdout"</index></member><text><p>Everything the process wrote on stdout, unless a stdout function was -  provided.</p> - </text></group><group><member><type><string/></type><index>"stderr"</index></member><text><p>Everything the process wrote on stderr, similarly.</p> - </text></group><group><member><type><int/></type><index>"exitcode"</index></member><text><p>The process' exitcode.</p> - </text></group></mapping> - </text></group><group><note/><text><p>As the entire output of stderr and stdout is stored in the -  returned mapping it could potentially grow until memory runs out. -  It is therefore advisable to set up rlimits if the output has a -  potential to be very large, or else provide functions to handle -  partial data.</p> - </text></group><group><example/><text><p>Process.run( ({ "ls", "-l" }) ); -  Process.run( ({ "ls", "-l" }), ([ "cwd":"/etc" ]) ); -  Process.run( "ls -l" ); -  Process.run( "awk -F: '{print $2}'", ([ "stdin":"foo:2\nbar:17\n" ]) );</p> - </text></group></doc> - <method name='run'> - <arguments><argument name='cmd'><type><or><string/><array><valuetype><string/></valuetype></array></or></type></argument><argument name='modifiers'><type><or><mapping/><void/></or></type></argument></arguments> - <returntype><mapping/></returntype> - </method> - </docgroup> +    <docgroup homogen-name='search_path' homogen-type='method'><doc><text><p>Search for the path to an executable.</p>   </text><group><param name='command'/><text><p>Executable to search for.</p>   <p> Searches for <ref resolved='predef::Process.search_path.command'>command</ref> in the directories listed in the    environment variable <tt>$PATH</tt>.</p>   </text></group><group><returns/><text><p>Returns the path to <ref resolved='predef::Process.search_path.command'>command</ref> if found, and    <expr>0</expr> (zero) on failure.</p>   </text></group><group><note/><text><p>This function is NOT thread safe if the environment    variable <tt>$PATH</tt> is being changed concurrently.</p>   </text></group><group><note/><text><p>In Pike 7.8.752 and earlier the environment    variable <tt>$PATH</tt> was only read once.</p>