chiark / gitweb /
kmod: autoload unix.ko if it isn't around
[elogind.git] / 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);