.\" Copyright (c) 1983, 1991 The Regents of the University of California. .\" All rights reserved. .\" .\" %%%LICENSE_START(BSD_4_CLAUSE_UCB) .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" %%%LICENSE_END .\" .\" @(#)socketpair.2 6.4 (Berkeley) 3/10/91 .\" .\" Modified 1993-07-24 by Rik Faith .\" Modified 1996-10-22 by Eric S. Raymond .\" Modified 2002-07-22 by Michael Kerrisk .\" Modified 2004-06-17 by Michael Kerrisk .\" 2008-10-11, mtk: Add description of SOCK_NONBLOCK and SOCK_CLOEXEC .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH SOCKETPAIR 2 "11 octobre 2008" Linux "Manuel du programmeur Linux" .SH NOM socketpair \- Créer une paire de sockets connectées .SH SYNOPSIS \fB#include \fP /* Consultez NOTES */ .br \fB#include \fP .sp \fBint socketpair(int \fP\fIdomain\fP\fB, int \fP\fItype\fP\fB, int \fP\fIprotocol\fP\fB, int \fP\fIsv\fP\fB[2]);\fP .SH DESCRIPTION La fonction \fBsocketpair\fP() crée une paire de sockets connectées, sans noms, dans le domaine de communication \fIdomain\fP, du \fItype\fP indiqué, en utilisant le protocole optionnel \fIprotocol\fP. Pour plus de détails sur ces paramètres, consultez \fBsocket\fP(2). Les descripteurs correspondant aux deux sockets sont placés dans \fIsv\fP[0] et \fIsv\fP[1]. Les deux sockets ne sont pas différenciables. .SH "VALEUR RENVOYÉE" S'il réussit, cet appel système renvoie 0. S'il échoue, il renvoie \-1 et remplit \fIerrno\fP en conséquence. .SH ERREURS .TP \fBEAFNOSUPPORT\fP La famille de communication n'est pas supportée sur cette machine. .TP \fBEFAULT\fP \fIsv\fP pointe en dehors de l'espace d'adressage accessible. .TP \fBEMFILE\fP Trop de descripteurs de fichier utilisés par le processus en cours. .TP \fBENFILE\fP La limite du nombre total de fichiers ouverts sur le système a été atteinte. .TP \fBEOPNOTSUPP\fP La protocole de communication mentionné ne permet pas la création d'une paire de sockets. .TP \fBEPROTONOSUPPORT\fP La protocole de communication n'est pas supportée sur cette machine. .SH CONFORMITÉ BSD\ 4.4, POSIX.1\-2001. La fonction \fBsocketpair\fP() est apparue dans BSD\ 4.2. Elle est généralement portable de/vers les systèmes non\-BSD supportant les clones des sockets BSD (y compris les variantes de System\ V). .SH NOTES Sous Linux, le seul domaine supportant cet appel est \fBAF_UNIX\fP (ou le synonyme, \fBAF_LOCAL\fP). (La plupart des implémentations ont la même restriction). Depuis Linux 2.6.27, \fBsocketpair\fP() prend en charge les attributs \fBSOCK_NONBLOCK\fP et \fBSOCK_CLOEXEC\fP décrits dans \fBsocket\fP(2). POSIX.1\-2001 ne requiert pas l'inclusion de \fI\fP, et cet en\(hytête n'est pas nécessaire sous Linux. Cependant, il doit être inclus sous certaines implémentations historiques (BSD), et les applications portables devraient probablement l'utiliser. .SH "VOIR AUSSI" \fBpipe\fP(2), \fBread\fP(2), \fBsocket\fP(2), \fBwrite\fP(2), \fBsocket\fP(7), \fBunix\fP(7) .SH COLOPHON Cette page fait partie de la publication 3.65 du projet \fIman\-pages\fP Linux. Une description du projet et des instructions pour signaler des anomalies peuvent être trouvées à l'adresse \%http://www.kernel.org/doc/man\-pages/. .SH TRADUCTION Depuis 2010, cette traduction est maintenue à l'aide de l'outil po4a par l'équipe de traduction francophone au sein du projet perkamon . .PP Christophe Blaess (1996-2003), Alain Portal (2003-2006). Julien Cristau et l'équipe francophone de traduction de Debian\ (2006-2009). .PP Veuillez signaler toute erreur de traduction en écrivant à ou par un rapport de bogue sur le paquet \fBmanpages\-fr\fR. .PP Vous pouvez toujours avoir accès à la version anglaise de ce document en utilisant la commande «\ \fBman\ \-L C\fR \fI
\fR\ \fI\fR\ ».