diff options
| author | Kevin Morales <32549527+kmorales13@users.noreply.github.com> | 2026-11-21 22:40:34 -0700 |
|---|---|---|
| committer | Kevin Morales <32549527+kmorales13@users.noreply.github.com> | 2026-11-21 22:40:56 -0700 |
| commit | 8b51490ea7e6684b1b8ecf995ee86b5ccc599f58 (patch) | |
| tree | 260dfa4582c73d7398aaa18d9205133502301680 /runtime/src/pe_loader.cpp | |
| parent | dcd8ecf10b138566d567020562b7afd853a89024 (diff) | |
process: park game threads that end the run until the host exits
Under Wine before 11.2, gta6rt --run sometimes exited 0 although the game
ended with 1 (run_tiny_game_exit_code in CI's Wine 9.0 job: 13 of 64 runs).
end_run signalled the host and called ExitThread; the host's ExitProcess
could then send SIGQUIT to that thread while it was exiting, Wine counted
the thread out twice and the process ended with _exit(0). Upstream fixed
it by blocking SIGQUIT during thread exit (4a9bc42a, wine-11.2).
end_run now parks every caller while a run is in progress (the first one
after recording the code and signalling), so no game thread is mid-exit
when the host calls ExitProcess. This also fixes two threads calling exit
at once: the second one called ExitProcess itself, sometimes before the
first had stored its code, and ended the process with 0 on any OS.
CI requires run_tiny_game_exit_code again.
Diffstat (limited to 'runtime/src/pe_loader.cpp')
0 files changed, 0 insertions, 0 deletions