summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorbms <bms@FreeBSD.org>2004-06-23 00:20:46 +0000
committerbms <bms@FreeBSD.org>2004-06-23 00:20:46 +0000
commitd46dec63e59a2ad4413cadc39463a57cda169f92 (patch)
tree74b19f2cbd87a8eee114b29a28cf2acf7bf1eedd /lib
parent00a26380d46d88d76ced8274bb50f6e150dad4cc (diff)
downloadFreeBSD-src-d46dec63e59a2ad4413cadc39463a57cda169f92.zip
FreeBSD-src-d46dec63e59a2ad4413cadc39463a57cda169f92.tar.gz
Be specific about which socket properties are inherited from the original
socket upon accept(2). PR: docs/54995, kern/45733
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/accept.223
1 files changed, 13 insertions, 10 deletions
diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2
index a876774..387c7fc 100644
--- a/lib/libc/sys/accept.2
+++ b/lib/libc/sys/accept.2
@@ -56,18 +56,21 @@ and is listening for connections after a
.Xr listen 2 .
The
.Fn accept
-system call
-extracts the first connection request
-on the queue of pending connections, creates
-a new socket with the same properties as
-.Fa s ,
-and allocates a new file descriptor
-for the socket. If no pending connections are
-present on the queue, and the socket is not marked
-as non-blocking,
+system call extracts the first connection request on the
+queue of pending connections, creates a new socket,
+and allocates a new file descriptor for the socket which
+inherits the state of the
+.Dv O_NONBLOCK
+property from the original socket
+.Fa s .
+.Pp
+If no pending connections are
+present on the queue, and the original socket
+is not marked as non-blocking,
.Fn accept
blocks the caller until a connection is present.
-If the socket is marked non-blocking and no pending
+If the original socket
+is marked non-blocking and no pending
connections are present on the queue,
.Fn accept
returns an error as described below.
OpenPOWER on IntegriCloud