Thread (5 messages) 5 messages, 2 authors, 2022-06-06

[PATCH] poll.2: Set fd to its bitwise complement to ignore

From: David Ward <hidden>
Date: 2022-05-16 02:35:26
Subsystem: the rest · Maintainer: Linus Torvalds

Unlike negating the fd, this works even for fd 0. It is a better fix for
https://bugzilla.kernel.org/show_bug.cgi?id=79411.

Signed-off-by: David Ward <redacted>
---
 man2/poll.2 | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/man2/poll.2 b/man2/poll.2
index 205468f3e..cd65bc6e8 100644
--- a/man2/poll.2
+++ b/man2/poll.2
@@ -83,10 +83,9 @@ field returns zero.
 (This provides an easy way of ignoring a
 file descriptor for a single
 .BR poll ()
-call: simply negate the
+call: simply set the
 .I fd
-field.
-Note, however, that this technique can't be used to ignore file descriptor 0.)
+field to its bitwise complement.)
 .PP
 The field
 .I events
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help