1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-09-10 12:03:16 +02:00

Bug 487444 - Spawner.exec() fails if child process cannot breakaway from parent job

This commit is contained in:
Anton Leherbauer 2016-02-08 13:49:32 +01:00
parent 95164173c0
commit 345877d034
3 changed files with 4 additions and 0 deletions

View file

@ -302,6 +302,10 @@ int main() {
// to our own job object.
BOOL f = CreateProcessW(NULL, szCmdLine, NULL, NULL, TRUE,
CREATE_BREAKAWAY_FROM_JOB, NULL, NULL, &si, &pi);
// If breaking away from job is not permitted, retry without breakaway flag
if (!f)
f = CreateProcessW(NULL, szCmdLine, NULL, NULL, TRUE,
0, NULL, NULL, &si, &pi);
// We don't need them any more
CloseHandle(stdHandles[0]);