aboutsummaryrefslogtreecommitdiff
path: root/libs/plugin_python/tests/python/test_functional.py
diff options
context:
space:
mode:
authorSulfurNitride <SulfurNitride@users.noreply.github.com>2026-05-16 11:20:42 -0500
committerSulfurNitride <lukew19@proton.me>2026-05-16 11:21:54 -0500
commita09fb2fbefba58faa0b50eb15dd46945ca288294 (patch)
treef68c7674a3d433d6f9233ad9520a41a634c6bad7 /libs/plugin_python/tests/python/test_functional.py
parent25de000982a6281e3efdd8db896c731c333e7b48 (diff)
ui: take down full process tree and unmount VFS on force-unlock
The previous force-unlock path SIGTERMed only displayPid (one tracked .exe) and called killWineserverForPrefix(winePrefix), but winePrefix was read from the root pid — a Proton wrapper that frequently lacks WINEPREFIX in its environ even though the game pid underneath has it. When that lookup returned empty, killWineserverForPrefix bailed early, wineserver stayed alive, and the rest of the Wine process tree survived. Skyrim via SKSE was the canonical failure mode: skse_loader exits early, the tracked pid becomes SkyrimSE.exe, SIGTERM hits that one pid, audio/physics workers keep running. ForceUnlocked also returned without calling afterRun(), because shouldRefresh(ForceUnlocked) returned false to "avoid racing with file updates." That gated the FUSE unmount along with the directory refresh, so the VFS mount under the game directory leaked across launches. Add killProcessTree(pid_t root) using the existing children/descendant helpers — SIGTERM the whole tree, wait briefly, SIGKILL survivors. Merge ForceUnlocked and Cancelled into a shared branch that: - resolves an effective WINEPREFIX by falling through displayPid, lastTrackedPid, and root pid until one carries the env var; - kills the descendant tree of the root pid (covers launcher .exe grandchildren that would otherwise survive); - hard-kills wineserver for the resolved prefix; - sets exitCode = 1 so afterRun()'s plugin-sync gate refuses to trust possibly-half-written Plugins.txt. Flip shouldRefresh(ForceUnlocked) to true so afterRun() runs and the FUSE VFS unmounts. The "racing with writes" concern is moot now that every Wine process is dead before we return from the branch. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'libs/plugin_python/tests/python/test_functional.py')
0 files changed, 0 insertions, 0 deletions