summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBruce M Simpson <bms@FreeBSD.org>2004-06-23 00:20:46 +0000
committerBruce M Simpson <bms@FreeBSD.org>2004-06-23 00:20:46 +0000
commitcb450d22332f4ea2344bd480ac855cbaea9df7d8 (patch)
tree74b19f2cbd87a8eee114b29a28cf2acf7bf1eedd /lib
parenta3146ff925a9cacccf24e6c7f47465710f91c70b (diff)
Notes
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 a876774abd52..387c7fc76aa1 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.