]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
service: don't bother with watching PIDs during deserialization
authorLennart Poettering <lennart@poettering.net>
Mon, 22 Jan 2018 16:44:43 +0000 (17:44 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 23 Jan 2018 20:29:31 +0000 (21:29 +0100)
service_coldplug() takes care of that anyway, hence drop the
unit_watch_pid() invocation entirely during serialization, it's
redundant.

src/core/service.c

index 124b334e3e4b8eb3a7b936ac792b100736260880..08362510fc19597c5a2eba7a3b14d4d129fbdec8 100644 (file)
@@ -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;