summaryrefslogtreecommitdiff
path: root/src/spawn.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-08-25 20:12:25 +0200
committerTannin <devnull@localhost>2014-08-25 20:12:25 +0200
commit84598cbcbf08862fe02300bf3945b194df12ddfa (patch)
tree60d1e02575cfa5204470b9f9c00d80ba156604c6 /src/spawn.cpp
parent02973be652a4fd1f161d62ff60509eed639f8d6a (diff)
- processes spawned from MO are now themselves allowed to break away from the job.
Without this the CEF (chromium embedded framework) seems to fail - bugfix: Fixed an error message when installing a fomod wrapped in an archive - bugfix: sorting plugins had no effect on non-skyrim games - bugfix: fomod parser quit installing filelists after one file - bugfix: function retrieving local appdata path read wrong directory
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r--src/spawn.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index c05049c2..ddcf573e 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -117,10 +117,17 @@ HANDLE startBinary(const QFileInfo &binary,
HANDLE stdOut,
HANDLE stdErr)
{
+ JOBOBJECT_EXTENDED_LIMIT_INFORMATION jobInfo;
+
+ ::QueryInformationJobObject(NULL, JobObjectExtendedLimitInformation, &jobInfo, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION), NULL);
+ jobInfo.BasicLimitInformation.LimitFlags |= JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK | JOB_OBJECT_LIMIT_BREAKAWAY_OK;
+
HANDLE jobObject = ::CreateJobObject(NULL, NULL);
if (jobObject == NULL) {
qWarning("failed to create job object: %lu", ::GetLastError());
+ } else {
+ ::SetInformationJobObject(jobObject, JobObjectExtendedLimitInformation, &jobInfo, sizeof(JOBOBJECT_EXTENDED_LIMIT_INFORMATION));
}
HANDLE processHandle, threadHandle;