summaryrefslogtreecommitdiffstats
path: root/lib/libutil/pidfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libutil/pidfile.c')
-rw-r--r--lib/libutil/pidfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libutil/pidfile.c b/lib/libutil/pidfile.c
index 0b8ade1..cf7441e 100644
--- a/lib/libutil/pidfile.c
+++ b/lib/libutil/pidfile.c
@@ -175,7 +175,7 @@ pidfile_write(struct pidfh *pfh)
}
snprintf(pidstr, sizeof(pidstr), "%u", getpid());
- if (write(fd, pidstr, strlen(pidstr)) != (ssize_t)strlen(pidstr)) {
+ if (pwrite(fd, pidstr, strlen(pidstr), 0) != (ssize_t)strlen(pidstr)) {
error = errno;
_pidfile_remove(pfh, 0);
errno = error;
OpenPOWER on IntegriCloud