mirror of https://github.com/mkerrisk/man-pages
accept.2: ffix
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
5355ff8241
commit
c63f06b5ff
|
@ -45,12 +45,12 @@ accept, accept4 \- accept a connection on a socket
|
|||
.nf
|
||||
.BR "#include <sys/types.h>" " /* See NOTES */"
|
||||
.B #include <sys/socket.h>
|
||||
|
||||
.PP
|
||||
.BI "int accept(int " sockfd ", struct sockaddr *" addr ", socklen_t *" addrlen );
|
||||
|
||||
.PP
|
||||
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
|
||||
.B #include <sys/socket.h>
|
||||
|
||||
.PP
|
||||
.BI "int accept4(int " sockfd ", struct sockaddr *" addr ,
|
||||
.BI " socklen_t *" addrlen ", int " flags );
|
||||
.fi
|
||||
|
@ -78,7 +78,7 @@ bound to a local address with
|
|||
.BR bind (2),
|
||||
and is listening for connections after a
|
||||
.BR listen (2).
|
||||
|
||||
.PP
|
||||
The argument
|
||||
.I addr
|
||||
is a pointer to a
|
||||
|
@ -96,7 +96,7 @@ When
|
|||
is NULL, nothing is filled in; in this case,
|
||||
.I addrlen
|
||||
is not used, and should also be NULL.
|
||||
|
||||
.PP
|
||||
The
|
||||
.I addrlen
|
||||
argument is a value-result argument:
|
||||
|
@ -104,7 +104,7 @@ the caller must initialize it to contain the
|
|||
size (in bytes) of the structure pointed to by
|
||||
.IR addr ;
|
||||
on return it will contain the actual size of the peer address.
|
||||
|
||||
.PP
|
||||
The returned address is truncated if the buffer provided is too small;
|
||||
in this case,
|
||||
.I addrlen
|
||||
|
@ -137,7 +137,7 @@ Alternatively, you can set the socket to deliver
|
|||
when activity occurs on a socket; see
|
||||
.BR socket (7)
|
||||
for details.
|
||||
|
||||
.PP
|
||||
If
|
||||
.IR flags
|
||||
is 0, then
|
||||
|
@ -295,10 +295,10 @@ first appeared in 4.2BSD).
|
|||
.\" EAGAIN, EBADF, ECONNABORTED, EINTR, EINVAL, EMFILE,
|
||||
.\" ENFILE, ENOBUFS, ENOMEM, ENOTSOCK, EOPNOTSUPP, EPROTO, EWOULDBLOCK.
|
||||
.\" In addition, SUSv2 documents EFAULT and ENOSR.
|
||||
|
||||
.PP
|
||||
.BR accept4 ()
|
||||
is a nonstandard Linux extension.
|
||||
.LP
|
||||
.PP
|
||||
On Linux, the new socket returned by
|
||||
.BR accept ()
|
||||
does \fInot\fP inherit file status flags such as
|
||||
|
@ -319,7 +319,7 @@ POSIX.1-2001 does not require the inclusion of
|
|||
and this header file is not required on Linux.
|
||||
However, some historical (BSD) implementations required this header
|
||||
file, and portable applications are probably wise to include it.
|
||||
|
||||
.PP
|
||||
There may not always be a connection waiting after a
|
||||
.B SIGIO
|
||||
is delivered or
|
||||
|
@ -341,7 +341,7 @@ needs to have the
|
|||
.B O_NONBLOCK
|
||||
flag set (see
|
||||
.BR socket (7)).
|
||||
|
||||
.PP
|
||||
For certain protocols which require an explicit confirmation,
|
||||
such as DECnet,
|
||||
.BR accept ()
|
||||
|
|
Loading…
Reference in New Issue