Skip to main content

Module socket

Module socket 

Source
Expand description

Safe wrapper around socketpair(2).

Creates a connected pair of Unix stream sockets. Both ends are marked FD_CLOEXEC after creation; the child’s end must have this flag cleared inside pre_exec (see spawn.rs).

Functions§

create_socketpair
Returns (master_fd, child_fd) as OwnedFd values.