From 096ca08af40fc8b220b5e56cccda5581ac71fac7 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sun, 15 Apr 2012 23:45:42 +1200 Subject: [PATCH] poll.2: Document negative value in 'fd' field Reported-by: Michael Welsh Duggan Signed-off-by: Michael Kerrisk --- man2/poll.2 | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/man2/poll.2 b/man2/poll.2 index 7cf164238..e04716bfe 100644 --- a/man2/poll.2 +++ b/man2/poll.2 @@ -28,7 +28,7 @@ .\" 2006-07-01, mtk, Added POLLRDHUP + various other wording and .\" formatting changes. .\" -.TH POLL 2 2010-09-20 "Linux" "Linux Programmer's Manual" +.TH POLL 2 2012-04-15 "Linux" "Linux Programmer's Manual" .SH NAME poll, ppoll \- wait for some event on a file descriptor .SH SYNOPSIS @@ -72,6 +72,17 @@ array in The field .I fd contains a file descriptor for an open file. +If this field is negative, then the corresponding +.I events +field is ignored and the +.I revents +field returns zero. +(This provides an easy way of ignoring a +file descriptor for a single +.BR poll () +call: simply negate the +.I fd +field.) The field .I events