summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/unit.c')
-rw-r--r--src/core/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/unit.c b/src/core/unit.c
index d529638f86..21ad434f9d 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -1833,7 +1833,7 @@ void unit_tidy_watch_pids(Unit *u, pid_t except1, pid_t except2) {
if (pid == except1 || pid == except2)
continue;
- if (kill(pid, 0) < 0 && errno == ESRCH)
+ if (!pid_is_unwaited(pid))
set_remove(u->pids, e);
}
}