fix(launch): start the daemon outside Steam's process tree - #109
Merged
Merged
Conversation
Steam runs the launch command under a subreaper, so a process the launcher starts and leaves behind is handed to Steam when the game exits, and Steam keeps the game marked as running until it dies. The telemetry daemon was that process whenever the launcher had to start it: DiRT Rally 2.0 stayed "running" after exit until the daemon was killed by hand (#105). Reproduced under an emulated reaper: the daemon was the one child reparented to it after the game exited. setsid does not escape a subreaper. A transient user service does, because systemd becomes its parent, so the launcher starts the daemon with systemd-run where that works, output still appended to the launcher log. Where no user service manager is available the daemon runs as a child of the session and is stopped when the game exits. Both paths checked under the emulated reaper: nothing is left for Steam to wait on.
mescon
enabled auto-merge
September 18, 2026 08:52
3 tasks
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



For #105 (DiRT Rally 2.0 left "running" in Steam after exit). Steam's reaper is a subreaper; a daemon the launcher started was reparented to it and kept the game marked running. Reproduced with an emulated subreaper (prctl PR_SET_CHILD_SUBREAPER): the daemon was the one child left. The launcher now starts it with
systemd-run --user(output appended to the launcher log), falling back to a session child that is stopped at exit. Both paths verified under the emulated reaper; core tests pass (they caught an unbound variable on the daemon-off path, fixed); shellcheck adds nothing new.