pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:1:   #pike __REAL_VERSION__      constant create_process = __builtin.create_process;      #if constant(__builtin.TraceProcess)   constant TraceProcess = __builtin.TraceProcess;   #endif    - #if defined(__NT__) || defined(__amigaos__) || defined(__OS2__) + #if defined(__NT__)   constant path_separator = ";";   #else   constant path_separator = ":";   #endif      #if constant(Stdio.__HAVE_SEND_FD__)   protected Stdio.File forkd_pipe;   protected create_process forkd_pid;      //! Encoder for data to be sent to @[Tools.Standalone.forkd].
pike.git/lib/modules/Process.pmod:382: Inside #if constant(Stdio.__HAVE_SEND_FD__)
   do {    do_poll(t);    if (t < 1.0) t += 0.1;    } while (__status <= 0);    return __result;    }    return ::wait();    }   #endif /* __HAVE_SEND_FD__ */    -  protected void destroy() { +  protected void _destruct() {    remove_call_out(watcher);    remove_call_out(killer);   #if constant(Stdio.__HAVE_SEND_FD__)    remove_call_out(process_poll);   #endif    }       protected void watcher() {    // It was another sigchld, but not one from our process.    if(status()==0)
pike.git/lib/modules/Process.pmod:916:    if(stdin) data->stdin=stdin;    if(stdout) data->stdout=stdout;    if(stderr) data->stderr=stderr;   #if defined(__NT__)    // if the command string command is not quoted, add double quotes to    // make sure it is not modified by create_process    if (sizeof(command) <= 1 ||    command[0] != '\"' || command[sizeof(command)-1] != '\"')    command = "\"" + command + "\"";    return Process(({ "cmd", "/c", command }),data); - #elif defined(__amigaos__) -  return Process(split_quoted_string(command),data); - #else /* !__NT__||__amigaos__ */ + #else /* !__NT__ */    return Process(({ "/bin/sh", "-c", command }),data); - #endif /* __NT__||__amigaos__ */ + #endif /* __NT__ */   }      //! @decl string popen(string command)   //! Executes @[command] as a shell statement ("@expr{/bin/sh -c   //! @[command]@}" for Unix, "@expr{cmd /c @[command]@}" for Windows),   //! waits until it has finished and returns the result as a string.   //!   //! @seealso   //! @[system], @[spawn]