core: on unified we don't need to check u->pids: we can use proper notifications...
authorEvgeny Vereshchagin <evvers@ya.ru>
Tue, 14 Jun 2016 12:08:01 +0000 (15:08 +0300)
committerLennart Poettering <lennart@poettering.net>
Tue, 14 Jun 2016 12:08:01 +0000 (14:08 +0200)
Fixes: #3483

src/core/scope.c
src/core/service.c

index 238f63a..decd1a1 100644 (file)
@@ -428,8 +428,9 @@ static void scope_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         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 */
-        if (set_isempty(u->pids))
+        /* If the PID set is empty now, then let's finish this off
+           (On unified we use proper notifications) */
+        if (cg_unified() <= 0 && set_isempty(u->pids))
                 scope_notify_cgroup_empty_event(u);
 }
 
index 7ebabca..14da6a5 100644 (file)
@@ -2800,8 +2800,9 @@ static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
         unit_tidy_watch_pids(u, s->main_pid, s->control_pid);
         unit_watch_all_pids(u);
 
-        /* If the PID set is empty now, then let's finish this off */
-        if (set_isempty(u->pids))
+        /* If the PID set is empty now, then let's finish this off
+           (On unified we use proper notifications) */
+        if (cg_unified() <= 0 && set_isempty(u->pids))
                 service_notify_cgroup_empty_event(u);
 }