pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:10:   //! @seealso   //! @[create_process]   class Process   {    inherit __builtin.create_process;    static function(Process:void) read_cb;    static function(Process:void) timeout_cb;       //! @param args    //! Either a command line array, as the command_args -  //! argument to @[create_process], or a string that +  //! argument to @[create_process()], or a string that    //! will be splitted into a command line array by -  //! calling @[split_quoted_string]. +  //! calling @[split_quoted_string()] in an operating +  //! system dependant mode.    //! @param m    //! In addition to the modifiers that @[create_process] accepts,    //! this object also accepts    //! @mapping    //! @member function(Process:void) "read_callback"    //! This callback is called when there is data to be read    //! from the process.    //! @member function(Process:void) "timeout_callback"    //! This callback is called if the process times out.    //! @member int "timeout"    //! The time it takes for the process to time out. Default is    //! 15 seconds.    //! @endmapping    //! @seealso    //! @[create_process], @[split_quoted_string]    static void create( string|array(string) args, void|mapping(string:mixed) m )    { -  if( stringp( args ) ) -  args = split_quoted_string( [string]args ); -  +  if( stringp( args ) ) { +  args = split_quoted_string( [string]args + #ifdef __NT__ +  ,1 + #endif /* __NT__ */ +  ); +  }    if( m )    ::create( [array(string)]args, [mapping(string:mixed)]m );    else    ::create( [array(string)]args );       if(read_cb=m->read_callback)    call_out(watcher, 0.1);       if( (timeout_cb=m->timeout_callback) || m->timeout )    call_out(killer, m->timeout||15);