Module Name: src
Committed By: martin
Date: Fri Oct 11 17:30:20 UTC 2024
Modified Files:
src/lib/libc/sys [netbsd-10]: poll.2 select.2
Log Message:
Pull up following revision(s) (requested by riastradh in ticket #946):
lib/libc/sys/poll.2: revision 1.38
lib/libc/sys/select.2: revision 1.44
lib/libc/sys/select.2: revision 1.45
lib/libc/sys/select.2: revision 1.46
select(2), poll(2): Clarify return values.
select.2: note when pselect(2) was added
select(2): Cite standards conformance in man page.
(Should we cite the earliest standard, or the most recent standard,
if they're the same as far as anyone has noticed?)
PR standards/49999: the history and standards conformance of
pselect(2) is not documented
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.37.6.1 src/lib/libc/sys/poll.2
cvs rdiff -u -r1.43 -r1.43.14.1 src/lib/libc/sys/select.2
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/lib/libc/sys/poll.2
diff -u src/lib/libc/sys/poll.2:1.37 src/lib/libc/sys/poll.2:1.37.6.1
--- src/lib/libc/sys/poll.2:1.37 Tue Feb 9 09:01:29 2021
+++ src/lib/libc/sys/poll.2 Fri Oct 11 17:30:20 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: poll.2,v 1.37 2021/02/09 09:01:29 wiz Exp $
+.\" $NetBSD: poll.2,v 1.37.6.1 2024/10/11 17:30:20 martin Exp $
.\"
.\" Copyright (c) 1998, 2005, 2020 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -210,8 +210,10 @@ Sockets produce POLLIN rather than POLLH
end is closed.
.Sh RETURN VALUES
.Fn poll
-returns the number of descriptors that are ready for I/O, or \-1 if an
-error occurred.
+returns the number of descriptors that are ready for I/O, or returns
+\-1 and sets
+.Dv errno
+if an error occurred.
If the time limit expires,
.Fn poll
returns 0.
Index: src/lib/libc/sys/select.2
diff -u src/lib/libc/sys/select.2:1.43 src/lib/libc/sys/select.2:1.43.14.1
--- src/lib/libc/sys/select.2:1.43 Wed Oct 25 17:39:47 2017
+++ src/lib/libc/sys/select.2 Fri Oct 11 17:30:20 2024
@@ -1,4 +1,4 @@
-.\" $NetBSD: select.2,v 1.43 2017/10/25 17:39:47 abhinav Exp $
+.\" $NetBSD: select.2,v 1.43.14.1 2024/10/11 17:30:20 martin Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -29,7 +29,7 @@
.\"
.\" @(#)select.2 8.2 (Berkeley) 3/25/94
.\"
-.Dd November 28, 2013
+.Dd September 9, 2024
.Dt SELECT 2
.Os
.Sh NAME
@@ -155,7 +155,9 @@ interface instead, which tends to be mor
.Fn select
returns the number of ready descriptors that are contained in
the descriptor sets,
-or \-1 if an error occurred.
+or returns \-1 and sets
+.Dv errno
+if an error occurred.
If the time limit expires,
.Fn select
returns 0.
@@ -266,11 +268,30 @@ One of its components is negative or too
.Xr send 2 ,
.Xr write 2 ,
.Xr getdtablesize 3
+.Sh STANDARDS
+The
+.Fn select
+function, along with
+.Fn FD_CLR ,
+.Fn FD_ISSET ,
+.Fn FD_SET , and
+.Fn FD_ZERO ,
+conforms to
+.St -xpg4.2 .
+.Pp
+The
+.Fn pselect
+function conforms to
+.St -p1003.1-2004 .
.Sh HISTORY
The
.Fn select
function call appeared in
.Bx 4.2 .
+The
+.Fn pselect
+function call first appeared in
+.Nx 3.0 .
.Sh BUGS
Although the provision of
.Xr getdtablesize 3