Skip to content

Commit

Permalink
core: on unified we don't need to check u->pids: we can use proper no…
Browse files Browse the repository at this point in the history
…tifications

Fixes: systemd#3483
  • Loading branch information
evverx committed Jun 13, 2016
1 parent 1be3f47 commit cd060ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/core/scope.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
5 changes: 3 additions & 2 deletions src/core/service.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit cd060ab

Please sign in to comment.