Partially revert r255486, the first argument to socketpair() is a socket

domain, not a file descriptor.  Use 'domain' instead of the original 'd'
for this argument to match socket(2).

PR:		199491
Reported by:	sp55aa@qq.com
MFC after:	1 week
This commit is contained in:
jhb 2015-05-04 14:23:31 +00:00
parent 6c91165dc2
commit f3e222f33f

View File

@ -28,7 +28,7 @@
.\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93 .\" @(#)socketpair.2 8.1 (Berkeley) 6/4/93
.\" $FreeBSD$ .\" $FreeBSD$
.\" .\"
.Dd September 11, 2013 .Dd May 4, 2015
.Dt SOCKETPAIR 2 .Dt SOCKETPAIR 2
.Os .Os
.Sh NAME .Sh NAME
@ -40,13 +40,13 @@
.In sys/types.h .In sys/types.h
.In sys/socket.h .In sys/socket.h
.Ft int .Ft int
.Fn socketpair "int fd" "int type" "int protocol" "int *sv" .Fn socketpair "int domain" "int type" "int protocol" "int *sv"
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Fn socketpair .Fn socketpair
system call creates an unnamed pair of connected sockets in system call creates an unnamed pair of connected sockets in
the specified domain the specified communications
.Fa fd , .Fa domain ,
of the specified of the specified
.Fa type , .Fa type ,
and using the optionally specified and using the optionally specified