From: Evgeny Vereshchagin Date: Tue, 14 Jun 2016 12:08:01 +0000 (+0300) Subject: core: on unified we don't need to check u->pids: we can use proper notifications... X-Git-Tag: v231~163 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bbc85a16e12083fdf13215c07a57ad7a5fb56ef8;p=thirdparty%2Fsystemd.git core: on unified we don't need to check u->pids: we can use proper notifications (#3531) Fixes: #3483 --- diff --git a/src/core/scope.c b/src/core/scope.c index 238f63a7299..decd1a1f3f1 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -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); } diff --git a/src/core/service.c b/src/core/service.c index 7ebabca5d6e..14da6a58a9a 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -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); }