int socketpair(int domain, int type, int *fds);
This syscall creates a pair of interconnected sockets, that are otherwise
identical, and returns their FDs on fds[0]
and fds[1]
. The
arguments are the same as the parent socket
syscall.
This syscall returns 0
on success and -1
on failure, and shares
errnos with the main socket
syscall.