diff options
author | Michael Biebl <biebl@debian.org> | 2018-01-28 22:49:17 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2018-01-28 22:49:17 +0100 |
commit | 1d42b86df9052528a8f56b2f52d8bc2faf87b2da (patch) | |
tree | 0d80f37a1ad6f02067261ee3e7ee62e1869fcd56 /src/core/scope.c | |
parent | 52ad194e0b816b8273dd8d0fea3e6d467f6ca34e (diff) | |
download | systemd-1d42b86df9052528a8f56b2f52d8bc2faf87b2da.tar.gz |
New upstream version 237
Diffstat (limited to 'src/core/scope.c')
-rw-r--r-- | src/core/scope.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/core/scope.c b/src/core/scope.c index 10454d56b0..468dd81217 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -472,19 +472,16 @@ static void scope_notify_cgroup_empty_event(Unit *u) { static void scope_sigchld_event(Unit *u, pid_t pid, int code, int status) { - /* If we get a SIGCHLD event for one of the processes we were - interested in, then we look for others to watch, under the - assumption that we'll sooner or later get a SIGCHLD for - them, as the original process we watched was probably the - parent of them, and they are hence now our children. */ + assert(u); + /* If we get a SIGCHLD event for one of the processes we were interested in, then we look for others to + * watch, under the assumption that we'll sooner or later get a SIGCHLD for them, as the original + * process we watched was probably the parent of them, and they are hence now our children. */ unit_tidy_watch_pids(u, 0, 0); unit_watch_all_pids(u); - /* If the PID set is empty now, then let's finish this off - (On unified we use proper notifications) */ - if (cg_unified_controller(SYSTEMD_CGROUP_CONTROLLER) == 0 && set_isempty(u->pids)) - scope_notify_cgroup_empty_event(u); + /* If the PID set is empty now, then let's finish this off. */ + unit_synthesize_cgroup_empty_event(u); } static int scope_dispatch_timer(sd_event_source *source, usec_t usec, void *userdata) { |