Skip to content
Snippets Groups Projects
Commit 81badab3 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

util: replace pipe()+cloexec with g_unix_open_pipe()


Suggested-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
parent a7241974
No related branches found
No related tags found
No related merge requests found
......@@ -60,14 +60,11 @@ static int qemu_signalfd_compat(const sigset_t *mask)
info = g_malloc(sizeof(*info));
if (pipe(fds) == -1) {
if (!g_unix_open_pipe(fds, FD_CLOEXEC, NULL)) {
g_free(info);
return -1;
}
qemu_set_cloexec(fds[0]);
qemu_set_cloexec(fds[1]);
memcpy(&info->mask, mask, sizeof(*mask));
info->fd = fds[1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment