Syntax for executing shell commands
This commit is contained in:
@@ -367,8 +367,11 @@ Process CreateCommandLineProcess(String command_line, String working_dir) {
|
||||
String16 cmd = ToString16(scratch, command_line);
|
||||
void *env = NULL;
|
||||
|
||||
DWORD dwCreationFlags = 0;
|
||||
BOOL bInheritHandles = TRUE;
|
||||
|
||||
PROCESS_INFORMATION info = {};
|
||||
if (!CreateProcessW(L"c:\\windows\\system32\\cmd.exe", cmd.data, 0, 0, TRUE, 0, env, cwd.data, &startup, &info)) {
|
||||
if (!CreateProcessW(L"c:\\windows\\system32\\cmd.exe", cmd.data, 0, 0, bInheritHandles, dwCreationFlags, env, cwd.data, &startup, &info)) {
|
||||
Win32ProcessError(&process, "failed to create process", command_line);
|
||||
return process;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user