annotate usr/src/man/man3socket/accept.3socket @ 14022:19e11862653b

3713 Implement accept4() 3714 Implement pipe2() 3715 Implement dup3() 3716 Implement mkostemp() and mkostemps() 3719 so_socketpair syscall should preserve FD_CLOEXEC flag Reviewed by: Dan McDonald <danmcd@nexenta.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Approved by: Garrett D'Amore <garrett@damore.org>
author Theo Schlossnagle <jesus@omniti.com>
date Thu, 11 Apr 2013 04:50:36 +0000
parents 5b2854ecc12d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
1 '\" te
13476
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
2 .\" Copyright 1989 AT&T
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
3 .\" Copyright (C) 2002, Sun Microsystems, Inc. All Rights Reserved
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
4 .\" Copyright (c) 2013, OmniTI Computer Consulting, Inc. All rights reserved.
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
5 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
6 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
7 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
8 .TH ACCEPT 3SOCKET "Apr 19, 2013"
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
9 .SH NAME
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
10 accept \- accept a connection on a socket
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
11 .SH SYNOPSIS
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
12 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
13 .nf
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
14 \fBcc\fR [ \fIflag\fR ... ] \fIfile\fR ... \fB-lsocket\fR \fB -lnsl \fR [ \fIlibrary\fR ... ]
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
15 #include <sys/types.h>
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
16 #include <sys/socket.h>
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
17
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
18 \fBint\fR \fBaccept\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIaddr\fR, \fBsocklen_t *\fR\fIaddrlen\fR);
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
19
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
20 \fBint\fR \fBaccept4\fR(\fBint\fR \fIs\fR, \fBstruct sockaddr *\fR\fIaddr\fR, \fBsocklen_t *\fR\fIaddrlen\fR,
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
21 \fBint\fR \fIflags\fR);
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
22 .fi
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
23
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
24 .SH DESCRIPTION
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
25 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
26 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
27 The argument \fIs\fR is a socket that has been created with
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
28 \fBsocket\fR(3SOCKET) and bound to an address with \fBbind\fR(3SOCKET), and
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
29 that is listening for connections after a call to \fBlisten\fR(3SOCKET). The
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
30 \fBaccept()\fR function extracts the first connection on the queue of pending
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
31 connections, creates a new socket with the properties of \fIs\fR, and allocates
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
32 a new file descriptor, \fIns\fR, for the socket. If no pending connections are
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
33 present on the queue and the socket is not marked as non-blocking,
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
34 \fBaccept()\fR blocks the caller until a connection is present. If the socket
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
35 is marked as non-blocking and no pending connections are present on the queue,
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
36 \fBaccept()\fR returns an error as described below. The \fBaccept()\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
37 function uses the \fBnetconfig\fR(4) file to determine the \fBSTREAMS\fR device
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
38 file name associated with \fIs\fR. This is the device on which the connect
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
39 indication will be accepted. The accepted socket, \fIns\fR, is used to read and
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
40 write data to and from the socket that connected to \fIns\fR. It is not used to
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
41 accept more connections. The original socket (\fIs\fR) remains open for
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
42 accepting further connections.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
43 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
44 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
45 The argument \fIaddr\fR is a result parameter that is filled in with the
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
46 address of the connecting entity as it is known to the communications layer.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
47 The exact format of the \fIaddr\fR parameter is determined by the domain in
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
48 which the communication occurs.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
49 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
50 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
51 The argument \fIaddrlen\fR is a value-result parameter. Initially, it contains
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
52 the amount of space pointed to by \fIaddr\fR; on return it contains the length
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
53 in bytes of the address returned.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
54 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
55 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
56 The \fBaccept()\fR function is used with connection-based socket types,
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
57 currently with \fBSOCK_STREAM\fR.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
58 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
59 .LP
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
60 The \fBaccept4()\fR function allows flags that control the behavior of a
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
61 successfully accepted socket. If \fIflags\fR is 0, \fBaccept4()\fR acts
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
62 identically to \fBaccept()\fR. Values for \fIflags\fR are constructed by
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
63 a bitwise-inclusive-OR of flags from the following list, defined in
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
64 <sys/socketvar.h>.
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
65 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
66 .ne 2
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
67 .na
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
68 \fB\fBSOCK_CLOEXEC\fR\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
69 .ad
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
70 .RS 12n
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
71 The accepted socket will have the FD_CLOEXEC flag set as if \fBfcntl()\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
72 was called on it. This flag is set before the socket is passed to the
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
73 caller thus avoiding the race condition between \fBaccept()\fR and
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
74 \fBfcntl()\fR. See, \fBO_CLOEXEC\fR in \fBopen(2)\fR for more details.
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
75 .RE
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
76
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
77 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
78 .ne 2
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
79 .na
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
80 \fB\fBSOCK_NDELAY\fR\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
81 .ad
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
82 .RS 12n
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
83 The accepted socket will have the \fBO_NDELAY\fR flag set as if \fBfcntl()\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
84 was called on it. This sets the socket into non-blocking mode. See
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
85 \fBO_NDELAY\fR in \fBfcntl.h(3HEAD)\fR for more details.
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
86 .RE
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
87
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
88 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
89 .ne 2
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
90 .na
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
91 \fB\fBSOCK_NONBLOCK\fR\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
92 .ad
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
93 .RS 12n
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
94 The accepted socket will have the \fBO_NONBLOCK\fR flag set as if
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
95 \fBfcntl()\fR was called on it. This sets the socket into non-blocking mode
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
96 (POSIX; see \fBstandards(5)\fR). See \fBO_NONBLOCK\fR in \fBfcntl.h(3HEAD)\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
97 for more details.
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
98 .RE
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
99 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
100 .LP
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
101 It is possible to \fBselect\fR(3C) or \fBpoll\fR(2) a socket for the purpose of
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
102 an \fBaccept()\fR by selecting or polling it for a read. However, this will
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
103 only indicate when a connect indication is pending; it is still necessary to
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
104 call \fBaccept()\fR.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
105 .SH RETURN VALUES
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
106 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
107 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
108 The \fBaccept()\fR function returns \fB\(mi1\fR on error. If it succeeds, it
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
109 returns a non-negative integer that is a descriptor for the accepted socket.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
110 .SH ERRORS
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
111 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
112 .LP
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
113 \fBaccept()\fR and \fBaccept4()\fR will fail if:
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
114 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
115 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
116 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
117 \fB\fBEBADF\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
118 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
119 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
120 The descriptor is invalid.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
121 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
122
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
123 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
124 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
125 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
126 \fB\fBECONNABORTED\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
127 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
128 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
129 The remote side aborted the connection before the \fBaccept()\fR operation
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
130 completed.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
131 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
132
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
133 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
134 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
135 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
136 \fB\fBEFAULT\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
137 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
138 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
139 The \fIaddr\fR parameter or the \fIaddrlen\fR parameter is invalid.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
140 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
141
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
142 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
143 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
144 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
145 \fB\fBEINTR\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
146 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
147 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
148 The \fBaccept()\fR attempt was interrupted by the delivery of a signal.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
149 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
150
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
151 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
152 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
153 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
154 \fB\fBEMFILE\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
155 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
156 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
157 The per-process descriptor table is full.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
158 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
159
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
160 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
161 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
162 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
163 \fB\fBENODEV\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
164 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
165 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
166 The protocol family and type corresponding to \fIs\fR could not be found in
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
167 the \fBnetconfig\fR file.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
168 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
169
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
170 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
171 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
172 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
173 \fB\fBENOMEM\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
174 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
175 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
176 There was insufficient user memory available to complete the operation.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
177 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
178
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
179 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
180 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
181 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
182 \fB\fBENOSR\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
183 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
184 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
185 There were insufficient \fBSTREAMS\fR resources available to complete the
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
186 operation.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
187 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
188
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
189 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
190 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
191 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
192 \fB\fBENOTSOCK\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
193 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
194 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
195 The descriptor does not reference a socket.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
196 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
197
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
198 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
199 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
200 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
201 \fB\fBEOPNOTSUPP\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
202 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
203 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
204 The referenced socket is not of type \fBSOCK_STREAM\fR.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
205 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
206
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
207 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
208 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
209 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
210 \fB\fBEPROTO\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
211 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
212 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
213 A protocol error has occurred; for example, the \fBSTREAMS\fR protocol stack
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
214 has not been initialized or the connection has already been released.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
215 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
216
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
217 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
218 .ne 2
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
219 .na
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
220 \fB\fBEWOULDBLOCK\fR\fR
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
221 .ad
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
222 .RS 16n
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
223 The socket is marked as non-blocking and no connections are present to be
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
224 accepted.
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
225 .RE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
226
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
227 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
228 .LP
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
229 \fBAdditionally, \fBaccept4()\fR will fail if:
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
230 .sp
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
231 .ne 2
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
232 .na
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
233 \fB\fBEINVAL\fR\fR
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
234 .ad
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
235 .RS 16n
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
236 The \fIflags\fR value is invalid. The \fIflags\fR argument can only be the
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
237 bitwise inclusive-OR of \fBSOCK_CLOEXEC\fR, \fBSOCK_NONBLOCK\fR, and
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
238 \fBSOCK_NDELAY\fR.
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
239 .RE
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
240
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
241 .SH ATTRIBUTES
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
242 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
243 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
244 See \fBattributes\fR(5) for descriptions of the following attributes:
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
245 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
246
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
247 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
248 .TS
13476
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
249 box;
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
250 c | c
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
251 l | l .
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
252 ATTRIBUTE TYPE ATTRIBUTE VALUE
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
253 _
13476
5b2854ecc12d 1502 Remove conversion cruft from manpages
Yuri Pankov <yuri.pankov@nexenta.com>
parents: 13304
diff changeset
254 MT-Level Safe
13304
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
255 .TE
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
256
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
257 .SH SEE ALSO
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
258 .sp
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
259 .LP
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
260 \fBpoll\fR(2), \fBbind\fR(3SOCKET), \fBconnect\fR(3SOCKET),
b54231762cfa 243 system manual pages should live with the software
Richard Lowe <richlowe@richlowe.net>
parents:
diff changeset
261 \fBlisten\fR(3SOCKET), \fBselect\fR(3C), \fBsocket.h\fR(3HEAD),
14022
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
262 \fBsocket\fR(3SOCKET), \fBnetconfig\fR(4), \fBattributes\fR(5),
19e11862653b 3713 Implement accept4()
Theo Schlossnagle <jesus@omniti.com>
parents: 13476
diff changeset
263 \fBfcntl.h(3HEAD)\fR, \fBfcntl(2)\fR, \fBstandards(5)\fR