Files
oldlinux-files/Ref-docs/syscalls/syscalls_55.html
2024-02-19 00:21:47 -05:00

44 lines
2.0 KiB
HTML

<html><!-- This HTML file has been created by texi2html 1.29
from syscalls.texi on 4 June 1994 -->
<TITLE>Syscall specifications of Linux - socketpair</TITLE>
<P>Go to the <A HREF="syscalls_54.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_54.html">previous</A>, <A HREF="syscalls_56.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_56.html">next</A> section.<P>
<H2><A NAME="SEC55" HREF="syscalls_toc.html#SEC55" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_toc.html#SEC55">socketpair</A></H2>
<P>
<H3>SYNOPSIS</H3>
<P>
<CODE>int socketpair(int <VAR>domain</VAR>, int <VAR>type</VAR>, int <VAR>protocol</VAR>,
int <VAR>sv[2]</VAR>);</CODE>
<H3>PARAMETERS</H3>
<P>
<VAR>domain</VAR>: [in] the socket protocol family.
<P>
<VAR>type</VAR>: [in] the socket type.
<P>
<VAR>protocol</VAR>: [in] the socket protocol.
<P>
<VAR>sv</VAR>: [out] the two file descriptors.
<P>
<H3>DESCRIPTION</H3>
<P>
Creates a pair of interconnected sockets. The two sockets are
indistinguishable. See <CODE>socket</CODE> for more information on domains,
types and protocols. See section <A HREF="syscalls_54.html#SEC54" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_54.html#SEC54">socket</A>
<P>
Linux 1.0 supports only the <CODE>AF_UNIX</CODE> domain for this call.
<P>
<H3>RETURN VALUE</H3>
<P>
On success, zero is returned. On error, -1 is returned and <CODE>errno</CODE>
is set to one of the following values:
<P>
<UL>
<LI><CODE>EACCESS</CODE>: the calling task does not have permission to
create a socket of the specified domain, type and protocol.
<LI><CODE>EPROTONOSUPPORT</CODE>, <CODE>EAFNOSUPPORT</CODE>, <CODE>EOPNOSUPPORT</CODE>,
<CODE>EMFILE</CODE>, <CODE>ENFILE</CODE>, <CODE>EFAULT</CODE> or <CODE>ENOBUFFS</CODE>.
</UL>
<P>
<P>Go to the <A HREF="syscalls_54.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_54.html">previous</A>, <A HREF="syscalls_56.html" tppabs="http://www.infran.ru/TechInfo/syscalls/syscalls_56.html">next</A> section.<P>