aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
Diffstat (limited to 'util')
-rw-r--r--util/event_notifier-posix.c6
-rw-r--r--util/main-loop.c2
2 files changed, 3 insertions, 5 deletions
diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c
index 8dc30c5141..2aa14eabb3 100644
--- a/util/event_notifier-posix.c
+++ b/util/event_notifier-posix.c
@@ -52,13 +52,11 @@ int event_notifier_init(EventNotifier *e, int active)
if (qemu_pipe(fds) < 0) {
return -errno;
}
- ret = fcntl_setfl(fds[0], O_NONBLOCK);
- if (ret < 0) {
+ if (!g_unix_set_fd_nonblocking(fds[0], true, NULL)) {
ret = -errno;
goto fail;
}
- ret = fcntl_setfl(fds[1], O_NONBLOCK);
- if (ret < 0) {
+ if (!g_unix_set_fd_nonblocking(fds[1], true, NULL)) {
ret = -errno;
goto fail;
}
diff --git a/util/main-loop.c b/util/main-loop.c
index b7b0ce4ca0..9afac10dff 100644
--- a/util/main-loop.c
+++ b/util/main-loop.c
@@ -114,7 +114,7 @@ static int qemu_signal_init(Error **errp)
return -errno;
}
- fcntl_setfl(sigfd, O_NONBLOCK);
+ g_unix_set_fd_nonblocking(sigfd, true, NULL);
qemu_set_fd_handler(sigfd, sigfd_handler, NULL, (void *)(intptr_t)sigfd);