From bff9d86e0e0ccf23ce4c34024fa2fc33e1f8ff68 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 22 Aug 2021 12:39:59 +0300 Subject: [PATCH] Enable inheriting handles in CreateProcess --- source/core/windows/process.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core/windows/process.cpp b/source/core/windows/process.cpp index d6d1484..6123fa7 100644 --- a/source/core/windows/process.cpp +++ b/source/core/windows/process.cpp @@ -80,7 +80,7 @@ void Process::execute(const string &command, bool path_search, const Arguments & } const char *cmdptr = (path_search ? 0 : command.c_str()); const char *wd = (work_dir.empty() ? 0 : work_dir.c_str()); - if(!CreateProcess(cmdptr, const_cast(cmdline.c_str()), 0, 0, false, 0, 0, wd, &startup, &priv->info)) + if(!CreateProcess(cmdptr, const_cast(cmdline.c_str()), 0, 0, true, 0, 0, wd, &startup, &priv->info)) throw system_error("CreateProcess"); // XXX Should we close the duplicated handles? What if CreateProcess fails? -- 2.43.0