svcadm(8)을 검색하려면 섹션에서 8 을 선택하고, 맨 페이지 이름에 svcadm을 입력하고 검색을 누른다.
socketpair(3c)
Standard C Library Functions socketpair(3C)
NAME
socketpair - create a pair of connected sockets
SYNOPSIS
#include <sys/socket.h>
int socketpair(int domain, int type, int protocol, int sv[2]);
DESCRIPTION
The socketpair() library call creates an unnamed pair of connected
sockets in the specified address family domain, of the specified type,
that uses the optionally specified protocol. The descriptors that are
used in referencing the new sockets are returned in sv[0] and sv[1].
The two sockets are indistinguishable.
Some file descriptor flags can be specified at socket creation time to
avoid race conditions. These options are passed by using a bitwise-
inclusive-OR of flags with the value passed for the type parameter. See
the socket(3C) man page for the available flags.
RETURN VALUES
socketpair() returns −1 on failure and 0 on success.
ERRORS
The call succeeds unless:
EAFNOSUPPORT The specified address family is not supported on
this machine.
EMFILE Too many descriptors are in use by this process.
ENOMEM There was insufficient user memory for the operation
to complete.
ENOSR There were insufficient STREAMS resources for the
operation to complete.
EOPNOTSUPP The specified protocol does not support creation of
socket pairs.
EPROTONOSUPPORT The specified protocol is not supported on this
machine.
EACCES The process does not have appropriate privileges.
ATTRIBUTES
See attributes(7) for descriptions of the following attributes:
tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE TYPEAT‐
TRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelAsync-Signal-
Safe _ StandardSee standards(7).
SEE ALSO
pipe(2), read(2), write(2), socket.h(3HEAD), attributes(7)
NOTES
This call is currently implemented only for the AF_UNIX address family.
HISTORY
The socketpair() function has been present since the initial release of
Solaris.
Support for SOCK_* flags as part of the type parameter was added to
Oracle Solaris in the 11.4 release.
Oracle Solaris 11.4 2 Feb 2021 socketpair(3C)