From: Marc-André Lureau Date: Fri, 22 Apr 2022 10:51:10 +0000 (+0400) Subject: virtiofsd: replace pipe() with g_unix_open_pipe(CLOEXEC) X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=bd2142c353c683a26a968dafca14be02c07d6f96;p=qemu.git virtiofsd: replace pipe() with g_unix_open_pipe(CLOEXEC) Suggested-by: Daniel P. Berrangé Signed-off-by: Marc-André Lureau Reviewed-by: Daniel P. Berrangé --- 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;