summaryrefslogtreecommitdiff
path: root/src/core/unit.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-17 18:28:53 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-18 02:51:47 +0100
commit9f5650aecb22a1d864b2c0b749910556795f1490 (patch)
tree62283b6837299eff161d62438372ec6d54d6b451 /src/core/unit.c
parented7e5fe37d7e3392538844abadbb2903f4d2540f (diff)
util: generalize code that checks whether PIDs are alive or unwaited for
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);
}
}