]> git.proxmox.com Git - mirror_qemu.git/blobdiff - os-posix.c
bsd-user: Implement revoke, access, eaccess and faccessat
[mirror_qemu.git] / os-posix.c
index 1b746dba97a719e977a93a343dba89302d86f7d6..321fc4bd13b84e882a60bb8d9a839798b67a5da1 100644 (file)
@@ -215,7 +215,7 @@ void os_daemonize(void)
         pid_t pid;
         int fds[2];
 
-        if (pipe(fds) == -1) {
+        if (!g_unix_open_pipe(fds, FD_CLOEXEC, NULL)) {
             exit(1);
         }
 
@@ -240,7 +240,6 @@ void os_daemonize(void)
 
         close(fds[0]);
         daemon_pipe = fds[1];
-        qemu_set_cloexec(daemon_pipe);
 
         setsid();