]> git.tdb.fi Git - libs/core.git/commitdiff
Enable inheriting handles in CreateProcess
authorMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:39:59 +0000 (12:39 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 22 Aug 2021 09:39:59 +0000 (12:39 +0300)
source/core/windows/process.cpp

index d6d1484f7d3ec05079310d2412df2f2c37c7ac0c..6123fa7aad6ab73c67beae3df08f3141cfbcfae8 100644 (file)
@@ -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<char *>(cmdline.c_str()), 0, 0, false, 0, 0, wd, &startup, &priv->info))
+       if(!CreateProcess(cmdptr, const_cast<char *>(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?