⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 syscalls_55.html

📁 Linux系统调用
💻 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://personal.xfol.com/%7erezaie/syscall/syscalls_54.html">previous</A>, <A HREF="syscalls_56.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_56.html">next</A> section.<P>
<H2><A NAME="SEC55" HREF="syscalls_toc.html#SEC55" tppabs="http://personal.xfol.com/%7erezaie/syscall/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://personal.xfol.com/%7erezaie/syscall/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://personal.xfol.com/%7erezaie/syscall/syscalls_54.html">previous</A>, <A HREF="syscalls_56.html" tppabs="http://personal.xfol.com/%7erezaie/syscall/syscalls_56.html">next</A> section.<P>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -