Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/sys Document accept4 in accept(2)
details: https://anonhg.NetBSD.org/src/rev/98bce7e929dc
branches: trunk
changeset: 351272:98bce7e929dc
user: maya <maya%NetBSD.org@localhost>
date: Wed Feb 08 18:01:24 2017 +0000
description:
Document accept4 in accept(2)
diffstat:
lib/libc/sys/accept.2 | 20 ++++++++++++++++++--
1 files changed, 18 insertions(+), 2 deletions(-)
diffs (66 lines):
diff -r c5c4d122311a -r 98bce7e929dc lib/libc/sys/accept.2
--- a/lib/libc/sys/accept.2 Wed Feb 08 18:01:12 2017 +0000
+++ b/lib/libc/sys/accept.2 Wed Feb 08 18:01:24 2017 +0000
@@ -1,4 +1,4 @@
-.\" $NetBSD: accept.2,v 1.31 2013/08/02 20:13:09 wiz Exp $
+.\" $NetBSD: accept.2,v 1.32 2017/02/08 18:01:24 maya Exp $
.\"
.\" Copyright (c) 1983, 1990, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,11 +29,12 @@
.\"
.\" @(#)accept.2 8.2 (Berkeley) 12/11/93
.\"
-.Dd March 19, 2012
+.Dd February 8, 2017
.Dt ACCEPT 2
.Os
.Sh NAME
.Nm accept ,
+.Nm accept4 ,
.Nm paccept
.Nd accept a connection on a socket
.Sh LIBRARY
@@ -43,6 +44,8 @@
.Ft int
.Fn accept "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen"
.Ft int
+.Fn accept4 "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen" "int flags"
+.Ft int
.Fn paccept "int s" "struct sockaddr * restrict addr" "socklen_t * restrict addrlen" "const sigset_t * restrict sigmask" "int flags"
.Sh DESCRIPTION
The argument
@@ -136,6 +139,11 @@
.Xr setsockopt 2 .
.Pp
The
+.Fn accept4
+function is equivalent to paccept with sigmask
+.Dv NULL .
+.Pp
+The
.Fn paccept
function behaves exactly like
.Fn accept ,
@@ -184,6 +192,10 @@
On the other hand, there are implementations which don't do so.
Linux is an example of such implementations.
Portable programs should not rely on either of the behaviours.
+The
+.Pp
+.Fn accept4
+function is compatible with the Linux implementation.
.Sh ERRORS
The
.Fn accept
@@ -233,6 +245,10 @@
function appeared in
.Bx 4.2 .
The
+.Fn accept4
+function matches Linux semantics and appeared in
+.Nx 8.0 .
+The
.Fn paccept
function is inspired from Linux and appeared in
.Nx 6.0 .
Home |
Main Index |
Thread Index |
Old Index