chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Wed, 30 May 2018 05:50:14 +0000 (07:50 +0200)
commit8a493df450829eeaacac46243ecfcc99a40e3755
treee00fac9a98ad5858339e8bd632ab93df7f26a571
parent1498d2708fb132b57b5cb926b5e02ed344619d0e
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