summaryrefslogtreecommitdiff
path: root/src/spawn.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-12-15 22:35:02 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2019-12-15 22:35:02 -0500
commit05231eab45f86e3d0d342c429e35c8f7c813ea42 (patch)
treec61701573f691aae40fc6b801060ea120eb4d617 /src/spawn.cpp
parentf3c5cebb6e9262625105d4339a54a810d7816811 (diff)
temporary fix to keep MO locked for all processes when closing
save main window settings in closeEvent()
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r--src/spawn.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index f95846c8..33bdbc05 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -498,14 +498,16 @@ DWORD spawn(const SpawnParameters& sp, HANDLE& processHandle)
const auto wcommandLine = commandLine.toStdWString();
const auto wcwd = cwd.toStdWString();
+ const DWORD flags = CREATE_BREAKAWAY_FROM_JOB;
+
if (sp.hooked) {
success = ::CreateProcessHooked(
nullptr, const_cast<wchar_t*>(wcommandLine.c_str()), nullptr, nullptr,
- inheritHandles, 0, nullptr, wcwd.c_str(), &si, &pi);
+ inheritHandles, flags, nullptr, wcwd.c_str(), &si, &pi);
} else {
success = ::CreateProcess(
nullptr, const_cast<wchar_t*>(wcommandLine.c_str()), nullptr, nullptr,
- inheritHandles, 0, nullptr, wcwd.c_str(), &si, &pi);
+ inheritHandles, flags, nullptr, wcwd.c_str(), &si, &pi);
}
const auto e = GetLastError();