Skip to main content

create_socketpair

Function create_socketpair 

Source
pub fn create_socketpair() -> Result<(OwnedFd, OwnedFd)>
Expand description

Returns (master_fd, child_fd) as OwnedFd values.

The master_fd stays in the Rust process. The child_fd is dup2’d into the child’s descriptor slot inside pre_exec.