pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:492:   //! Either a command line array, as the command_args   //! argument to @[create_process()], or a string that   //! will be splitted into a command line array by   //! calling @[split_quoted_string()] in an operating   //! system dependant mode.   //! @param modifiers   //! It takes all the modifiers @[Process.Process] accepts, with   //! the exception of stdout and stderr. Since the point of this   //! function is to handle those you can not supply your own.   //! - //! If @expr{modifiers->stdin@} is set to a string it will automaticly be + //! If @expr{modifiers->stdin@} is set to a string it will automatically be   //! converted to a pipe that is fed to stdin of the started process.   //!   //! @seealso   //! @[Process.Process] @[create_process]   //!   //! @returns   //! @mapping   //! @member string "stdout"   //! Everything the process wrote on stdout.   //! @member string "stderr"   //! Everything the process wrote on stderr.   //! @member int "exitcode"   //! The process' exitcode.   //! @endmapping   //!   //! @note   //! As the entire output of stderr and stdout is stored in the   //! returned mapping it could potentially grow until memory runs out. - //! It is therefor adviceable to set up rlimits if the output has a + //! It is therefore advisable to set up rlimits if the output has a   //! potential to be very large.   //!   //! @example   //! 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" ]) );   mapping run(string|array(string) cmd, void|mapping modifiers)   {    string gotstdout="", gotstderr="", stdin_str;