New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logind: use pidfd to refer to session leader #28938
Conversation
Another piece in the pidfdize eveything puzzle. @bluca @poettering I'd like to get your thought on API and approach before adding docs, tests... |
so this looks OK, but is of course incomplete: logind passes the "leader" pid on to pid1 via the scope concept. But pid1 doesn't track scope processes via pidfd yet. Which is something we really should add. So this is still racy, though the race is certainly smaller now. And I think it's OK to merge even if the fix in PID 1 is not coming soon. |
Yeah I think this is a great starting point and we should add this interface even if the story is not complete end-to-end |
3a25764
to
1f52416
Compare
Now that #29142 has been merged this should be reworked around the new "PidRef" structure. |
5a6d922
to
4da65d0
Compare
@poettering Updated. I fixed everything mentioned above and I've also added fallback in |
This comment was marked as resolved.
This comment was marked as resolved.
4da65d0
to
8cfc131
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This new D-Bus API uses pidfd to refer to the session leader. Also, pam_systemd will try to make use of it when pidfd support is available.
8cfc131
to
08edb48
Compare
No description provided.