aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index fd2bdc9..9751bc6 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -184,7 +184,7 @@ bool qemu_write_pidfile(const char *path, Error **errp)
}
snprintf(pidstr, sizeof(pidstr), FMT_pid "\n", getpid());
- if (write(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
+ if (qemu_write_full(fd, pidstr, strlen(pidstr)) != strlen(pidstr)) {
error_setg(errp, "Failed to write pid file");
goto fail_unlink;
}