Merge "Close stdios when fork/exec'ing virtmgr" into main
diff --git a/libs/libvmclient/src/lib.rs b/libs/libvmclient/src/lib.rs
index 7b576e6..fe86504 100644
--- a/libs/libvmclient/src/lib.rs
+++ b/libs/libvmclient/src/lib.rs
@@ -45,6 +45,7 @@
use shared_child::SharedChild;
use std::io::{self, Read};
use std::process::Command;
+use std::process::Stdio;
use std::{
fmt::{self, Debug, Formatter},
fs::File,
@@ -90,6 +91,9 @@
let (client_fd, server_fd) = posix_socketpair()?;
let mut command = Command::new(VIRTMGR_PATH);
+ command.stdin(Stdio::null());
+ command.stdout(Stdio::null());
+ command.stderr(Stdio::null());
// Can't use BorrowedFd as it doesn't implement Display
command.arg("--rpc-server-fd").arg(format!("{}", server_fd.as_raw_fd()));
command.arg("--ready-fd").arg(format!("{}", ready_fd.as_raw_fd()));