Skip to main content

fd_install

Function fd_install 

Source
pub fn fd_install(gfd: i32, host_fd: RawFd) -> bool
Expand description

Installs host_fd into a specific guest FD slot (for dup2).

Closes any previous host mapping at gfd (except stdio 0–2 identity). Guest nonblock flag is not updated — caller should copy from the source. Returns false if gfd is out of range.