summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man2/accept.2
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/debian-unstable/man2/accept.2')
-rw-r--r--upstream/debian-unstable/man2/accept.230
1 files changed, 16 insertions, 14 deletions
diff --git a/upstream/debian-unstable/man2/accept.2 b/upstream/debian-unstable/man2/accept.2
index 340fdb83..47d72175 100644
--- a/upstream/debian-unstable/man2/accept.2
+++ b/upstream/debian-unstable/man2/accept.2
@@ -10,7 +10,7 @@
.\" Modified 2004-06-17 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" 2008-12-04, mtk, Add documentation of accept4()
.\"
-.TH accept 2 2023-04-05 "Linux man-pages 6.05.01"
+.TH accept 2 2024-05-02 "Linux man-pages 6.8"
.SH NAME
accept, accept4 \- accept a connection on a socket
.SH LIBRARY
@@ -19,13 +19,13 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <sys/socket.h>
-.PP
+.P
.BI "int accept(int " sockfd ", struct sockaddr *_Nullable restrict " addr ,
.BI " socklen_t *_Nullable restrict " addrlen );
-.PP
+.P
.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */"
.B #include <sys/socket.h>
-.PP
+.P
.BI "int accept4(int " sockfd ", struct sockaddr *_Nullable restrict " addr ,
.BI " socklen_t *_Nullable restrict " addrlen ", int " flags );
.fi
@@ -44,7 +44,7 @@ The newly created socket is not in the listening state.
The original socket
.I sockfd
is unaffected by this call.
-.PP
+.P
The argument
.I sockfd
is a socket that has been created with
@@ -53,7 +53,7 @@ bound to a local address with
.BR bind (2),
and is listening for connections after a
.BR listen (2).
-.PP
+.P
The argument
.I addr
is a pointer to a
@@ -71,7 +71,7 @@ When
is NULL, nothing is filled in; in this case,
.I addrlen
is not used, and should also be NULL.
-.PP
+.P
The
.I addrlen
argument is a value-result argument:
@@ -79,12 +79,12 @@ 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
+.P
The returned address is truncated if the buffer provided is too small;
in this case,
.I addrlen
will return a value greater than was supplied to the call.
-.PP
+.P
If no pending
connections are present on the queue, and the socket is not marked as
nonblocking,
@@ -97,7 +97,7 @@ fails with the error
.B EAGAIN
or
.BR EWOULDBLOCK .
-.PP
+.P
In order to be notified of incoming connections on a socket, you can use
.BR select (2),
.BR poll (2),
@@ -112,7 +112,7 @@ Alternatively, you can set the socket to deliver
when activity occurs on a socket; see
.BR socket (7)
for details.
-.PP
+.P
If
.I flags
is 0, then
@@ -222,7 +222,9 @@ The per-process limit on the number of open file descriptors has been reached.
.B ENFILE
The system-wide limit on the total number of open files has been reached.
.TP
-.BR ENOBUFS ", " ENOMEM
+.B ENOBUFS
+.TQ
+.B ENOMEM
Not enough free memory.
This often means that the memory allocation is limited by the socket buffer
limits, not by the system memory.
@@ -241,7 +243,7 @@ Firewall rules forbid connection.
.TP
.B EPROTO
Protocol error.
-.PP
+.P
In addition, network errors for the new socket and as defined
for the protocol may be returned.
Various Linux kernels can
@@ -313,7 +315,7 @@ needs to have the
.B O_NONBLOCK
flag set (see
.BR socket (7)).
-.PP
+.P
For certain protocols which require an explicit confirmation,
such as DECnet,
.BR accept ()