server: assume PID is dead on ESRCH
authorJens Axboe <axboe@kernel.dk>
Tue, 11 Oct 2011 09:45:35 +0000 (11:45 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 11 Oct 2011 09:45:35 +0000 (11:45 +0200)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
server.c

index 339bb66a6f3b980e6a031434e23a5344f544b9c5..e6c49cc88abfeee02a5aa9163fc89166d43a10fe 100644 (file)
--- a/server.c
+++ b/server.c
@@ -1008,7 +1008,7 @@ static int check_existing_pidfile(const char *pidfile)
 
        pid = atoi(buf);
        if (kill(pid, SIGCONT) < 0)
 
        pid = atoi(buf);
        if (kill(pid, SIGCONT) < 0)
-               return 0;
+               return errno != ESRCH;
 
        return 1;
 }
 
        return 1;
 }