summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorMarc-André Lureau2022-04-22 12:51:10 +0200
committerMarc-André Lureau2022-05-03 13:47:08 +0200
commitbd2142c353c683a26a968dafca14be02c07d6f96 (patch)
tree91fb895754bcfa155eebc00d9a1eec07890310c6 /tools
parentos-posix: replace pipe()+cloexec with g_unix_open_pipe(CLOEXEC) (diff)
downloadqemu-bd2142c353c683a26a968dafca14be02c07d6f96.tar.gz
qemu-bd2142c353c683a26a968dafca14be02c07d6f96.tar.xz
qemu-bd2142c353c683a26a968dafca14be02c07d6f96.zip
virtiofsd: replace pipe() with g_unix_open_pipe(CLOEXEC)
Suggested-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/virtiofsd/helper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/virtiofsd/helper.c b/tools/virtiofsd/helper.c
index f8981e5bdf..f5f66f292c 100644
--- a/tools/virtiofsd/helper.c
+++ b/tools/virtiofsd/helper.c
@@ -275,7 +275,7 @@ int fuse_daemonize(int foreground)
int waiter[2];
char completed;
- if (pipe(waiter)) {
+ if (!g_unix_open_pipe(waiter, FD_CLOEXEC, NULL)) {
fuse_log(FUSE_LOG_ERR, "fuse_daemonize: pipe: %s\n",
strerror(errno));
return -1;