Hi David, On 5/29/22 22:37, David Ward wrote:
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 <david.ward@xxxxxxxxxx>
Thanks for the patch.Could you please add some more detailed explanation of how this works better in the commit message?
I kind of imagine why, but I'm not very inspired at the moment to do some calculations, and would like to see some example numbers to visualize it and make sure I'm getting it right.
Thanks, Alex
--- 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
-- Alejandro Colomar <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature