Merge "Add as_raw_descriptor to control_server_socket"

This commit is contained in:
Elie Kheirallah 2023-03-21 21:44:43 +00:00 committed by Gerrit Code Review
commit 092a1f3fd7
1 changed files with 4 additions and 1 deletions

View File

@ -53,6 +53,7 @@ use tombstoned_client::{TombstonedConnection, DebuggerdDumpType};
use rpcbinder::RpcServer;
/// external/crosvm
use base::AsRawDescriptor;
use base::UnixSeqpacketListener;
use vm_control::{BalloonControlCommand, VmRequest, VmResponse};
@ -823,7 +824,9 @@ fn run_vm(
let control_server_socket = UnixSeqpacketListener::bind(crosvm_control_socket_path)
.context("failed to create control server")?;
command.arg("--socket").arg(add_preserved_fd(&mut preserved_fds, &control_server_socket));
command
.arg("--socket")
.arg(add_preserved_fd(&mut preserved_fds, &control_server_socket.as_raw_descriptor()));
debug!("Preserving FDs {:?}", preserved_fds);
command.preserved_fds(preserved_fds);