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>
This commit is contained in:
Marc-André Lureau 2022-04-22 14:51:10 +04:00
parent 3338a41f24
commit bd2142c353

View File

@ -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;