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: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]