From: Lennart Poettering Date: Thu, 11 Jan 2018 14:07:14 +0000 (+0100) Subject: unit: log when we cannot add a watch on a specific PID X-Git-Tag: v237~107^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8895eb7815de9931e043c2a3bd3e6750bee47719;p=platform%2Fupstream%2Fsystemd.git unit: log when we cannot add a watch on a specific PID --- diff --git a/src/core/service.c b/src/core/service.c index c6835a4..14763a8 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2588,7 +2588,9 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, log_unit_debug(u, "Failed to parse main-pid value: %s", value); else { service_set_main_pid(s, pid); - unit_watch_pid(UNIT(s), pid); + r = unit_watch_pid(UNIT(s), pid); + if (r < 0) + log_unit_debug_errno(u, r, "Failed to watch main PID, ignoring: %m"); } } else if (streq(key, "main-pid-known")) { int b;