diff --git a/src/core/scope.c b/src/core/scope.c index 4cd5e3dd2a..7e789ed147 100644 --- a/src/core/scope.c +++ b/src/core/scope.c @@ -522,6 +522,7 @@ int scope_abandon(Scope *s) { s->was_abandoned = true; s->controller = mfree(s->controller); + scope_set_state(s, SCOPE_ABANDONED); /* The client is no longer watching the remaining processes, * so let's step in here, under the assumption that the @@ -531,12 +532,6 @@ int scope_abandon(Scope *s) { unit_tidy_watch_pids(UNIT(s), 0, 0); unit_watch_all_pids(UNIT(s)); - /* If the PID set is empty now, then let's finish this off */ - if (set_isempty(UNIT(s)->pids)) - scope_notify_cgroup_empty_event(UNIT(s)); - else - scope_set_state(s, SCOPE_ABANDONED); - return 0; } diff --git a/src/login/logind-user.c b/src/login/logind-user.c index a90db3b33c..1103970f1a 100644 --- a/src/login/logind-user.c +++ b/src/login/logind-user.c @@ -540,7 +540,7 @@ static int user_remove_runtime_path(User *u) { r = rm_rf(u->runtime_path, 0); if (r < 0) - log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path); + log_error_errno(r, "Failed to remove runtime directory %s (before unmounting): %m", u->runtime_path); /* Ignore cases where the directory isn't mounted, as that's * quite possible, if we lacked the permissions to mount @@ -551,7 +551,7 @@ static int user_remove_runtime_path(User *u) { r = rm_rf(u->runtime_path, REMOVE_ROOT); if (r < 0) - log_error_errno(r, "Failed to remove runtime directory %s: %m", u->runtime_path); + log_error_errno(r, "Failed to remove runtime directory %s (after unmounting): %m", u->runtime_path); return r; }