Skip to content

process: derive AppID from /proc/$pid/cgroup instead of walking the process tree#2190

Open
oSoMoN wants to merge 1 commit into
ValveSoftware:masterfrom
oSoMoN:process-appid-from-cgroup
Open

process: derive AppID from /proc/$pid/cgroup instead of walking the process tree#2190
oSoMoN wants to merge 1 commit into
ValveSoftware:masterfrom
oSoMoN:process-appid-from-cgroup

Conversation

@oSoMoN
Copy link
Copy Markdown
Collaborator

@oSoMoN oSoMoN commented May 20, 2026

Replace the old get_appid_from_pid(), which walked up the process tree looking for a "reaper" process and parsing its command line, with a simpler and more robust approach that reads /proc/$pid/cgroup and extracts the AppID from the Steam systemd scope name (app-steam-app${appid}-${reaperpid}.scope).

Move the implementation to Utils/Process, and add unit tests.

…rocess tree

Replace the old get_appid_from_pid(), which walked up the process tree looking
for a "reaper" process and parsing its command line, with a simpler and more
robust approach that reads /proc/$pid/cgroup and extracts the AppID from the
Steam systemd scope name (app-steam-app${appid}-${reaperpid}.scope).

Move the implementation to Utils/Process, and add unit tests.
@3v1n0
Copy link
Copy Markdown

3v1n0 commented May 23, 2026

Also note https://blog.sebastianwick.net/posts/so-peerpidfd-gets-more-useful/ could be interesting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants