X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fservice.c;h=dadd98123cf6e15a12c6987cf4c0a5e4eaceaaa8;hp=20990d2a19bfcd97e0c8dc7f5bfdf612c33f84e7;hb=62220cf70e381f6e08390523e4696f7bc431f927;hpb=7085053a437456ab87d726f3697002dd811fdf7a diff --git a/src/core/service.c b/src/core/service.c index 20990d2a1..dadd98123 100644 --- a/src/core/service.c +++ b/src/core/service.c @@ -1865,7 +1865,7 @@ static int main_pid_good(Service *s) { /* If it's an alien child let's check if it is still * alive ... */ - if (s->main_pid_alien) + if (s->main_pid_alien && s->main_pid > 0) return kill(s->main_pid, 0) >= 0 || errno != ESRCH; /* .. otherwise assume we'll get a SIGCHLD for it,