From: Lennart Poettering Date: Mon, 22 Jan 2018 16:44:43 +0000 (+0100) Subject: service: don't bother with watching PIDs during deserialization X-Git-Tag: v237~37^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eabd3e56a6c263a5f5702cb80b2080a855be4567;p=platform%2Fupstream%2Fsystemd.git service: don't bother with watching PIDs during deserialization service_coldplug() takes care of that anyway, hence drop the unit_watch_pid() invocation entirely during serialization, it's redundant. --- diff --git a/src/core/service.c b/src/core/service.c index 124b334..0836251 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -2639,12 +2639,8 @@ static int service_deserialize_item(Unit *u, const char *key, const char *value, if (parse_pid(value, &pid) < 0) log_unit_debug(u, "Failed to parse main-pid value: %s", value); - else { - service_set_main_pid(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 + (void) service_set_main_pid(s, pid); } else if (streq(key, "main-pid-known")) { int b;