diff options
Diffstat (limited to 'src/core/service.c')
-rw-r--r-- | src/core/service.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/service.c b/src/core/service.c index 51297846f9..3a2ef01570 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1376,6 +1376,14 @@ static int service_load_pid_file(Service *s, bool may_warn) { return -ESRCH; } + if (get_process_state(pid) == 'Z') { + if (may_warn) + log_info_unit(UNIT(s)->id, + "PID "PID_FMT" read from file %s is a zombie.", + pid, s->pid_file); + return -ESRCH; + } + if (s->main_pid_known) { if (pid == s->main_pid) return 0; |