summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--os/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/os/utils.c b/os/utils.c
index 6e6974e89..83d85cdda 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -313,7 +313,8 @@ 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());
- (void) write(lfd, pid_str, 11);
+ if (write(lfd, pid_str, 11) != 11)
+ FatalError("Could not write pid to lock file in %s\n", tmp);
(void) fchmod(lfd, 0444);
(void) close(lfd);