Open intelfx opened 6 months ago
Can this be useful for #289?
@Vladimir-csp yes, I believe it can. This needs a bit more UI work (the code I wrote piggybacks on existing data structures used for raw session processes, so it does not offer to perform a systemctl --user restart
), but in principle this code already performs detection of user services which is what you ask for.
Right now, processes running under
systemd --user
confuse needrestart in several ways:systemd --user
as the logical parent (which means that needrestart will bogusly reportsystemd
itself as the process that needs to be restarted);systemd --user
instance itself needs a restart, needrestart won't do anything about it;systemd --user
(as opposed to an arbitrary process started in a user scope), needrestart won't use this information in any way.This PR offers a clean solution for (1) by disregarding the parent if it is a
systemd --user
instance (implemented via matching the cgroup of the parent against/init.scope$
), and pretty hacky solutions for (2) and (3) (hence the RFC status).