Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/sys select(2), poll(2): Clarify return values.



details:   https://anonhg.NetBSD.org/src/rev/384bebe33492
branches:  trunk
changeset: 377309:384bebe33492
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Jul 07 01:31:25 2023 +0000

description:
select(2), poll(2): Clarify return values.

diffstat:

 lib/libc/sys/poll.2   |  8 +++++---
 lib/libc/sys/select.2 |  6 ++++--
 2 files changed, 9 insertions(+), 5 deletions(-)

diffs (42 lines):

diff -r 6061df8e6a11 -r 384bebe33492 lib/libc/sys/poll.2
--- a/lib/libc/sys/poll.2       Fri Jul 07 00:25:23 2023 +0000
+++ b/lib/libc/sys/poll.2       Fri Jul 07 01:31:25 2023 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: poll.2,v 1.37 2021/02/09 09:01:29 wiz Exp $
+.\"    $NetBSD: poll.2,v 1.38 2023/07/07 01:31:25 riastradh 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.
diff -r 6061df8e6a11 -r 384bebe33492 lib/libc/sys/select.2
--- a/lib/libc/sys/select.2     Fri Jul 07 00:25:23 2023 +0000
+++ b/lib/libc/sys/select.2     Fri Jul 07 01:31:25 2023 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: select.2,v 1.43 2017/10/25 17:39:47 abhinav Exp $
+.\"    $NetBSD: select.2,v 1.44 2023/07/07 01:31:25 riastradh Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -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.



Home | Main Index | Thread Index | Old Index