feat(Process): Add options to disable STDIO in child process #3867

This commit is contained in:
Alex Fabijanic
2023-01-23 12:23:03 +01:00
parent feee864950
commit 4ceb731bba
9 changed files with 94 additions and 28 deletions

View File

@@ -98,7 +98,7 @@ public:
/// Returns the number of seconds spent by the
/// current process in user and kernel mode.
static ProcessHandle launch(const std::string& command, const Args& args);
static ProcessHandle launch(const std::string& command, const Args& args, int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.
@@ -106,7 +106,8 @@ public:
static ProcessHandle launch(
const std::string& command,
const Args& args,
const std::string& initialDirectory);
const std::string& initialDirectory,
int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.
@@ -117,7 +118,8 @@ public:
const Args& args,
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe);
Pipe* errPipe,
int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.
@@ -150,7 +152,8 @@ public:
const std::string& initialDirectory,
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe);
Pipe* errPipe,
int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.
@@ -184,7 +187,8 @@ public:
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe,
const Env& env);
const Env& env,
int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.
@@ -202,7 +206,8 @@ public:
Pipe* inPipe,
Pipe* outPipe,
Pipe* errPipe,
const Env& env);
const Env& env,
int options = 0);
/// Creates a new process for the given command and returns
/// a ProcessHandle of the new process. The given arguments are
/// passed to the command on the command line.