]> err.no Git - systemd/commitdiff
service: never supervise ourselves
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Jun 2010 17:47:13 +0000 (19:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Jun 2010 17:47:13 +0000 (19:47 +0200)
src/service.c

index 82a18a4311722aad1faf8306899e695c70e63682..547a55567abef7ea133d4cd3030739b94038d74e 100644 (file)
@@ -936,6 +936,9 @@ static int service_load_pid_file(Service *s) {
         if ((unsigned long) (pid_t) p != p)
                 return -ERANGE;
 
+        if (p <= 1)
+                return -ERANGE;
+
         if (kill((pid_t) p, 0) < 0 && errno != EPERM) {
                 log_warning("PID %llu read from file %s does not exist. Your service or init script might be broken.",
                             (unsigned long long) p, s->pid_file);