.\" Copyright (c) 1983, 1990, 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:
.\" 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
.\"
.\" Modified 1993-07-24 by Rik Faith <faith@cs.unc.edu>
.\" Modified 1996-10-21 by Eric S. Raymond <esr@thyrsus.com>
.\"
.TH ACCEPT 2 2010-09-10 "Linux" "Linux Programmer's Manual"
.SH NAME
-accept \- accept a connection on a socket
+accept, accept4 \- accept a connection on a socket
.SH SYNOPSIS
.nf
.BR "#include <sys/types.h>" " /* See NOTES */"
flag in
.BR open (2)
for reasons why this may be useful.
-.SH "RETURN VALUE"
+.SH RETURN VALUE
On success,
these system calls return a nonnegative integer that is a descriptor
for the accepted socket.
On error, \-1 is returned, and
.I errno
is set appropriately.
-.SS "Error Handling"
+.SS Error handling
Linux
.BR accept ()
(and
them like
.B EAGAIN
by retrying.
-In case of TCP/IP these are
+In the case of TCP/IP, these are
.BR ENETDOWN ,
.BR EPROTO ,
.BR ENOPROTOOPT ,
.BR accept4 ()
system call is available starting with Linux 2.6.28;
support in glibc is available starting with version 2.10.
-.SH "CONFORMING TO"
+.SH CONFORMING TO
.BR accept ():
POSIX.1-2001,
SVr4, 4.4BSD,
removed by an asynchronous network error or another thread before
.BR accept ()
is called.
-If this happens then the call will block waiting for the next
+If this happens, then the call will block waiting for the next
connection to arrive.
To ensure that
.BR accept ()
.SH EXAMPLE
See
.BR bind (2).
-.SH "SEE ALSO"
+.SH SEE ALSO
.BR bind (2),
.BR connect (2),
.BR listen (2),
.BR select (2),
.BR socket (2),
.BR socket (7)
+.SH COLOPHON
+This page is part of release 3.79 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.