autodoc.git / onepage.xml

version» Context lines:

autodoc.git/onepage.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='./onepage'>    <file name='./onepage/manual.html'>    <chapter number='1' title='Control Structures'>      <p>In this chapter all the control structures in Pike will be   explained. Control structures are used to control the flow of the   program execution. Note that functions that make the program pause and   simple function calls are not qualified as control structures.</p>      <section number='1' title='Conditions'>
autodoc.git/onepage.xml:3314:   <variable name='client_cert_distinguished_names'><type><array><valuetype><string/></valuetype></array></type></variable>   </docgroup>   <docgroup homogen-type='variable'><doc><text><p>Random cookies, sent and received with the hello-messages.</p>   </text></doc>   <variable name='client_random'><type><string/></type></variable>   <variable name='server_random'><type><string/></type></variable>   </docgroup>   <docgroup homogen-name='create' homogen-type='method'><doc><group><param name='is_server'/><text><p>Whether this is the server end of the connection or not.</p>   </text></group><group><param name='ctx'/><text><p>The context for the connection.</p>   </text></group><group><param name='min_version'/><text><p>Minimum version of SSL to support. -  Defaults to <ref resolved='predef::SSL.Constants.ProtocolVersion.PROTOCOL_SSL_3_0'>Constants.PROTOCOL_SSL_3_0</ref>.</p> +  Defaults to <ref resolved='7.8::SSL.Constants.ProtocolVersion.PROTOCOL_SSL_3_0'>Constants.PROTOCOL_SSL_3_0</ref>.</p>   </text></group><group><param name='max_version'/><text><p>Maximum version of SSL to support.    Defaults to <ref resolved='7.8::SSL.Constants.PROTOCOL_minor'>Constants.PROTOCOL_minor</ref>.</p>   </text></group></doc>   <method name='create'>   <arguments><argument name='is_server'><type><int/></type></argument><argument name='ctx'><type><or><void/><object resolved='7.8::SSL.context'>SSL.context</object></or></type></argument><argument name='min_version'><type><or><void/><object resolved='7.8::SSL.Constants.ProtocolVersion'>ProtocolVersion</object></or></type></argument><argument name='max_version'><type><or><void/><object resolved='7.8::SSL.Constants.ProtocolVersion'>ProtocolVersion</object></or></type></argument></arguments>   <returntype><void/></returntype>   </method>   </docgroup>   <docgroup homogen-name='handle_handshake' homogen-type='method'><doc><text><p>Do handshake processing. Type is one of HANDSHAKE_*, data is the    contents of the packet, and raw is the raw packet received (needed
autodoc.git/onepage.xml:103855:    moved forward one slot.</p>   </text></doc>   <method name='seek'>   <arguments><argument name='howmuch'><type><int/></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/onepage.xml:103934:   </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>