]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/core/scope.c
core: watch SIGCHLD more closely to track processes of units with no reliable cgroup...
authorLennart Poettering <lennart@poettering.net>
Thu, 6 Feb 2014 16:17:51 +0000 (17:17 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 7 Feb 2014 14:14:36 +0000 (15:14 +0100)
commita911bb9ab27ac0eb3bbf4e8b4109e5da9b88eee3
tree55b6b9de8c3ca096208b76ca113aa849119becb5
parent1006a62d20855eb7d70b044031a2a676a8111a0f
core: watch SIGCHLD more closely to track processes of units with no reliable cgroup empty notifier

When a process dies that we can associate with a specific unit, start
watching all other processes of that unit, so that we can associate
those processes with the unit too.

Also, for service units start doing this as soon as we get the first
SIGCHLD for either control or main process, so that we can follow the
processes of the service from one to the other, as long as process that
remain are processes of the ones we watched that died and got reassigned
to us as parent.

Similar, for scope units start doing this as soon as the scope
controller abandons the unit, and thus management entirely reverts to
systemd. To abandon a unit introduce a new Abandon() scope unit method
call.
src/core/dbus-scope.c
src/core/manager.c
src/core/scope.c
src/core/scope.h
src/core/service.c
src/core/unit.c
src/core/unit.h