~ubuntu-branches/ubuntu/saucy/manpages/saucy

« back to all changes in this revision

Viewing changes to man2/accept.2

  • Committer: Bazaar Package Importer
  • Author(s): Joey Schulze
  • Date: 2010-03-02 21:49:58 UTC
  • mfrom: (1.1.42 upstream) (2.2.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100302214958-69yjgb70t7wrjo3m
New upstream version
. Remove crufty statement in setuid(2) that seteuid() is not in POSIX
(closes: Bug#569812)
. Fix description of 'nochdir' argument in daemon(3) (closes: Bug#554819)
. Fix NAME line in path_resolution(7) (closes: Bug#558300)

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
.PP
111
111
If no pending
112
112
connections are present on the queue, and the socket is not marked as
113
 
non-blocking,
 
113
nonblocking,
114
114
.BR accept ()
115
115
blocks the caller until a connection is present.
116
116
If the socket is marked
117
 
non-blocking and no pending connections are present on the queue,
 
117
nonblocking and no pending connections are present on the queue,
118
118
.BR accept ()
119
119
fails with the error
120
120
.BR EAGAIN
177
177
for reasons why this may be useful.
178
178
.SH "RETURN VALUE"
179
179
On success,
180
 
these system calls return a non-negative integer that is a descriptor
 
180
these system calls return a nonnegative integer that is a descriptor
181
181
for the accepted socket.
182
182
On error, \-1 is returned, and
183
183
.I errno
213
213
.TP
214
214
.BR EAGAIN " or " EWOULDBLOCK
215
215
.\" Actually EAGAIN on Linux
216
 
The socket is marked non-blocking and no connections are
 
216
The socket is marked nonblocking and no connections are
217
217
present to be accepted.
218
218
POSIX.1-2001 allows either error to be returned for this case,
219
219
and does not require these constants to have the same value,
303
303
.\" In addition, SUSv2 documents EFAULT and ENOSR.
304
304
 
305
305
.BR accept4 ()
306
 
is a non-standard Linux extension.
 
306
is a nonstandard Linux extension.
307
307
.LP
308
308
On Linux, the new socket returned by
309
309
.BR accept ()
315
315
This behavior differs from the canonical BSD sockets implementation.
316
316
.\" Some testing seems to show that Tru64 5.1 and HP-UX 11 also
317
317
.\" do not inherit file status flags -- MTK Jun 05
318
 
Portable programs should not rely on inheritance or non-inheritance
 
318
Portable programs should not rely on inheritance or noninheritance
319
319
of file status flags and always explicitly set all required flags on
320
320
the socket returned from
321
321
.BR accept ().
384
384
.BR socket (2),
385
385
.BR socket (7)
386
386
.SH COLOPHON
387
 
This page is part of release 3.23 of the Linux
 
387
This page is part of release 3.24 of the Linux
388
388
.I man-pages
389
389
project.
390
390
A description of the project,