aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/oslib-posix.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util/oslib-posix.c b/util/oslib-posix.c
index 9751bc6be9..bcb35c3c82 100644
--- a/util/oslib-posix.c
+++ b/util/oslib-posix.c
@@ -138,9 +138,8 @@ bool qemu_write_pidfile(const char *path, Error **errp)
.l_len = 0,
};
- fd = qemu_open_old(path, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
+ fd = qemu_create(path, O_WRONLY, S_IRUSR | S_IWUSR, errp);
if (fd == -1) {
- error_setg_errno(errp, errno, "Cannot open pid file");
return false;
}