From 84598cbcbf08862fe02300bf3945b194df12ddfa Mon Sep 17 00:00:00 2001 From: Tannin Date: Mon, 25 Aug 2014 20:12:25 +0200 Subject: - 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 --- src/spawn.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/spawn.cpp') 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; -- cgit v1.3.1