diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-06-15 19:47:13 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-06-15 19:47:13 +0200 |
commit | 406eaf930be77133c1f58ba37171e6d5aa9489c7 (patch) | |
tree | 6e6231c8a64d32a2f6366738740fcb0d361b78d7 /src/service.c | |
parent | 84e3543ef4c4758621f8a304b14642072303ef82 (diff) |
service: never supervise ourselves
Diffstat (limited to 'src/service.c')
-rw-r--r-- | src/service.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/service.c b/src/service.c index 82a18a4311..547a55567a 100644 --- a/src/service.c +++ b/src/service.c @@ -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); |