X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Funit.c;h=016b1e3d869d846b29806e1be9f758c8529f249d;hp=d529638f86a300b75a7f10a552efb6b9a24dfcea;hb=db57f3c6d11864f4227bb6734a0d509695a32a7d;hpb=6d2357247b198314d972932415d65a42f83a9b6e diff --git a/src/core/unit.c b/src/core/unit.c index d529638f8..016b1e3d8 100644 --- a/src/core/unit.c +++ b/src/core/unit.c @@ -959,7 +959,7 @@ static int unit_add_target_dependencies(Unit *u) { Unit *target; Iterator i; unsigned k; - int r; + int r = 0; assert(u); @@ -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); } }