diff options
Diffstat (limited to 'os/utils.c')
-rw-r--r-- | os/utils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c index ddcd482e1..8d1418255 100644 --- a/os/utils.c +++ b/os/utils.c @@ -320,7 +320,7 @@ LockServer(void) } if (lfd < 0) FatalError("Could not create lock file in %s\n", tmp); - snprintf(pid_str, sizeof(pid_str), "%10ld\n", (long) getpid()); + snprintf(pid_str, sizeof(pid_str), "%10lu\n", (unsigned long) getpid()); if (write(lfd, pid_str, 11) != 11) FatalError("Could not write pid to lock file in %s\n", tmp); (void) fchmod(lfd, 0444); @@ -1364,6 +1364,12 @@ OsAbort(void) #ifndef __APPLE__ OsBlockSignals(); #endif +#if !defined(WIN32) || defined(__CYGWIN__) + /* abort() raises SIGABRT, so we have to stop handling that to prevent + * recursion + */ + OsSignal(SIGABRT, SIG_DFL); +#endif abort(); } |