From eabd3e56a6c263a5f5702cb80b2080a855be4567 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 22 Jan 2018 17:44:43 +0100 Subject: [PATCH] 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. --- src/core/service.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/service.c b/src/core/service.c index 124b334e3e4..08362510fc1 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;