aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJilles Tjoelker <jilles@FreeBSD.org>2013-10-01 21:17:18 +0000
committerJilles Tjoelker <jilles@FreeBSD.org>2013-10-01 21:17:18 +0000
commit0f49c96cfc484c26d9153727b7d929d1e353993e (patch)
treebb4dacbeb10ffe4398cdf294fb060a8a0356ebeb /lib
parentd6498b153ea68aa82ba227551caf48569e6379bc (diff)
downloadsrc-0f49c96cfc484c26d9153727b7d929d1e353993e.tar.gz
src-0f49c96cfc484c26d9153727b7d929d1e353993e.zip
accept(2): Update portability note for accept4().
The accept(2) man page warns that O_NONBLOCK and other properties on the new socket may vary across implementations. However, this issue only applies to accept() and not to accept4(). On the other hand, accept4() is not commonly available yet. Reported by: pluknet Reviewed by: bjk Approved by: re (kib)
Notes
Notes: svn path=/head/; revision=255980
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/sys/accept.213
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/libc/sys/accept.2 b/lib/libc/sys/accept.2
index 76fb463a1ef2..7b8422a05527 100644
--- a/lib/libc/sys/accept.2
+++ b/lib/libc/sys/accept.2
@@ -28,7 +28,7 @@
.\" @(#)accept.2 8.2 (Berkeley) 12/11/93
.\" $FreeBSD$
.\"
-.Dd May 1, 2013
+.Dd October 1, 2013
.Dt ACCEPT 2
.Os
.Sh NAME
@@ -155,13 +155,20 @@ For some applications, performance may be enhanced by using an
.Xr accept_filter 9
to pre-process incoming connections.
.Pp
-Portable programs should not rely on the
+When using
+.Fn accept ,
+portable programs should not rely on the
.Dv O_NONBLOCK
and
.Dv O_ASYNC
properties and the signal destination being inherited,
but should set them explicitly using
-.Xr fcntl 2 .
+.Xr fcntl 2 ;
+.Fn accept4
+sets these properties consistently,
+but may not be fully portable across
+.Ux
+platforms.
.Sh RETURN VALUES
These calls return \-1 on error.
If they succeed, they return a non-negative