]> err.no Git - systemd/commitdiff
service: when reading pid file make sure to watch the pid read
authorLennart Poettering <lennart@poettering.net>
Thu, 8 Apr 2010 02:05:56 +0000 (04:05 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 8 Apr 2010 02:05:56 +0000 (04:05 +0200)
service.c

index 832c7b326328d6a1429426fe72b94ab7eb95d43c..c914ecace571ea7c7d00a7a49783487831fb0e81 100644 (file)
--- a/service.c
+++ b/service.c
@@ -845,6 +845,10 @@ static int service_load_pid_file(Service *s) {
                 return -ESRCH;
         }
 
+        if ((r = unit_watch_pid(UNIT(s), (pid_t) p)) < 0)
+                /* FIXME: we need to do something here */
+                return r;
+
         s->main_pid = (pid_t) p;
         s->main_pid_known = true;