socketpair(2) System Calls Manual socketpair(2) socketpair - (libc -lc) #include int socketpair(int domain, int type, int protocol, int sv[2]); socketpair() domain type protocol . socket(2). sv[0] sv[1]. . . -1 errno sv ( ) socketpair() sv . POSIX.1-2008 TC2. EAFNOSUPPORT . EFAULT sv . EMFILE . ENFILE . EOPNOTSUPP . EPROTONOSUPPORT . AF_UNIX ( AF_LOCAL) AF_TIPC ( 4.12). POSIX.1-2024. POSIX.1-2001 4.2BSD. / BSD BSD ( System V). SOCK_CLOEXEC SOCK_NONBLOCK POSIX.1-2024; 2.6.27. ( socket(2).) pipe(2), read(2), socket(2), write(2), socket(7), unix(7) 3 . . : . 6.18 29 2025 socketpair(2)