diff --git a/os/utils.c b/os/utils.c index c3565f971..231554954 100644 --- a/os/utils.c +++ b/os/utils.c @@ -329,7 +329,7 @@ LockServer(void) */ break; } - else { + else if (errno == EEXIST) { /* * Read the pid from the existing file */ @@ -374,6 +374,12 @@ LockServer(void) LockFile, "\tand start again."); } } + else { + unlink(tmp); + FatalError + ("Linking lock file (%s) in place failed: %s\n", + LockFile, strerror(errno)); + } } unlink(tmp); if (!haslock)