aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/os
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/os')
-rw-r--r--nx-X11/programs/Xserver/os/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/programs/Xserver/os/utils.c b/nx-X11/programs/Xserver/os/utils.c
index f5f09c320..43d92ed98 100644
--- a/nx-X11/programs/Xserver/os/utils.c
+++ b/nx-X11/programs/Xserver/os/utils.c
@@ -411,7 +411,9 @@ LockServer(void)
if (lfd < 0)
FatalError("Could not create lock file in %s\n", tmp);
(void) sprintf(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);
+
#ifndef __UNIXOS2__
#ifndef USE_CHMOD
(void) fchmod(lfd, 0444);