]> git.ipfire.org Git - thirdparty/systemd.git/commit
core: fix manager_get_unit_by_pid() special casing of manager PID
authorLennart Poettering <lennart@poettering.net>
Thu, 11 Jan 2018 22:38:46 +0000 (23:38 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Jan 2018 20:22:50 +0000 (21:22 +0100)
commit2ca9d97943ad3a7308597645075cfa1c2fb4543c
treec9071e4857847a490982d08a74be11d028f48aea
parenteb5eb254dd6f55744f2ba1d00eefa99cae145280
core: fix manager_get_unit_by_pid() special casing of manager PID

Previously, we'd hard map PID 1 to the manager scope unit. That's wrong
however when we are run in --user mode, as the PID 1 is outside of the
subtree we manage and the manager PID might be very differently. Correct
that by checking for getpid() rather than hardcoding 1.
src/core/cgroup.c