vmspawn: fix FD passing logic

This commit is contained in:
Sam Leonard 2024-03-13 15:20:40 +00:00
parent 002243ea64
commit 4364a542e3
No known key found for this signature in database
GPG key ID: 96850F0978CE78F0

View file

@ -1736,7 +1736,7 @@ static int run_virtual_machine(int kvm_device_fd, int vhost_device_fd) {
r = pidref_safe_fork_full(
qemu_binary,
/* stdio_fds= */ NULL,
&child_vsock_fd, 1, /* pass the vsock fd to qemu */
pass_fds, n_pass_fds,
FORK_RESET_SIGNALS|FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_LOG|FORK_CLOEXEC_OFF|FORK_RLIMIT_NOFILE_SAFE,
&child_pidref);
if (r < 0)