From 9f5650aecb22a1d864b2c0b749910556795f1490 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 17 Feb 2014 18:28:53 +0100 Subject: util: generalize code that checks whether PIDs are alive or unwaited for --- src/core/unit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/unit.c') 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); } } -- cgit v1.2.3-54-g00ecf