pike.git / lib / modules / Process.pmod

version» Context lines:

pike.git/lib/modules/Process.pmod:768:    mapping(string:mixed) data=(["env":getenv()]);    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 create_process(({ "cmd", "/c", command }),data); +  return Process(({ "cmd", "/c", command }),data);   #elif defined(__amigaos__) -  return create_process(split_quoted_string(command),data); +  return Process(split_quoted_string(command),data);   #else /* !__NT__||__amigaos__ */ -  return create_process(({ "/bin/sh", "-c", command }),data); +  return Process(({ "/bin/sh", "-c", command }),data);   #endif /* __NT__||__amigaos__ */ -  +    }      //! @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]