fix(launcher): harden stale-client recovery

- fail closed when X11 omits _NET_CLIENT_LIST or WM_CLASS, and recognize the
  RiotClientServices window class;
- require stale client processes to be at least 60 seconds old;
- recheck process identity before SIGTERM and SIGKILL and recheck the window
  before signalling;
- document the age and window-detection guards.
This commit is contained in:
3AvisD committed 2026-10-23 06:08:45 -06:00
1 parent 0a04d4e16c
commit 9194beef2f
5 files changed
+144 -55

No files matched your search

+5 -4
View File
@@ -80,10 +80,11 @@ for the observed failures, recovery guards and NSURLSession limitations.
`RCLOL_RECOVER_STALE_CLIENT=1` opts in to partial runtime recovery before
launch. If `darlingserver` is alive, no game is running, no managed client
window is visible and stale Riot/League/CEF processes remain, the launcher stops
only that client tree and reuses the runtime. It preserves `darlingserver`,
launchd/mldr, sockets and `.init.pid`; if X11/Xwayland cannot be inspected it
does nothing. See
window is visible and stale Riot/League/CEF processes at least 60 seconds old
remain, the launcher stops only that client tree and reuses the runtime. It
recognizes `LeagueClientUx`, `Riot Client` and `RiotClientServices` windows and
preserves `darlingserver`, launchd/mldr, sockets and `.init.pid`; if X11/Xwayland
properties cannot be inspected it does nothing. See
[troubleshooting](TROUBLESHOOTING.md#client-remains-running-without-a-window).
`RCLOL_CLEAN_STALE_HELPERS=1` runs a preflight before the match helper starts.
+9 -7
View File
@@ -150,13 +150,15 @@ download is restarted when recovery is enabled. Other desktop environments are
not supported by this helper; recovery is off by default.
For a live Darling runtime with no visible client window but stale Riot/League/
CEF processes, `RCLOL_RECOVER_STALE_CLIENT=1` performs a partial recovery before
the next launch. It keeps `darlingserver`, launchd/mldr, sockets and `.init.pid`,
stops only the stale client process tree, and then lets the normal launcher start
the product again. It does nothing while a game process is running or when a
managed client window is visible. With X11/Xwayland unavailable it fails closed.
This saves the Darling bootstrap but not the Riot Client/CEF startup itself. If
no window appears afterward, use a full runtime shutdown/restart.
CEF processes at least 60 seconds old, `RCLOL_RECOVER_STALE_CLIENT=1` performs a
partial recovery before the next launch. It keeps `darlingserver`, launchd/mldr,
sockets and `.init.pid`, stops only the stale client process tree, and then lets
the normal launcher start the product again. It recognizes `LeagueClientUx`,
`Riot Client` and `RiotClientServices` windows, does nothing while a game process
is running or when a managed client window is visible, and fails closed when
X11/Xwayland properties are missing or unreadable. This saves the Darling
bootstrap but not the Riot Client/CEF startup itself. If no window appears
afterward, use a full runtime shutdown/restart.
### Multiple client-in-game helpers