Skip to content

Commit

Permalink
Fix #175: Update launchers with improved job setup logic.
Browse files Browse the repository at this point in the history
  • Loading branch information
vsajip committed Aug 3, 2022
1 parent 1e1c8f2 commit 52de225
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion PC/launcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,6 +831,8 @@ run_child(wchar_t * cmdline)
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), emessage, MSGSIZE, NULL);
wassert(ok, L"Unable to create process using '%ls': %ls", cmdline, emessage);
}
// Assign the process to the job straight away. See https://github.com/pypa/distlib/issues/175
AssignProcessToJobObject(job, child_process_info.hProcess);
post_spawn_cleanup(si.cbReserved2, si.lpReserved2);
/*
* Control handler setting is now done after process creation because the handler needs access
Expand All @@ -841,7 +843,6 @@ run_child(wchar_t * cmdline)
#if !defined(_CONSOLE)
clear_app_starting_state(&child_process_info);
#endif
AssignProcessToJobObject(job, child_process_info.hProcess);
CloseHandle(child_process_info.hThread);
WaitForSingleObjectEx(child_process_info.hProcess, INFINITE, FALSE);
ok = GetExitCodeProcess(child_process_info.hProcess, &rc);
Expand Down
Binary file modified distlib/t32.exe
Binary file not shown.
Binary file modified distlib/t64-arm.exe
Binary file not shown.
Binary file modified distlib/t64.exe
Binary file not shown.
Binary file modified distlib/w32.exe
Binary file not shown.
Binary file modified distlib/w64-arm.exe
Binary file not shown.
Binary file modified distlib/w64.exe
Binary file not shown.

0 comments on commit 52de225

Please sign in to comment.