public inbox for linux-man@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Epoll documentation
@ 2008-02-22 14:04 Chris "ク" Heath
       [not found] ` <1203689065.3021.79.camel-DBi1IKlRe8YXiSwHZUBl+UgmxNRb6L7S@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Chris "ク" Heath @ 2008-02-22 14:04 UTC (permalink / raw)
  To: linux-man-u79uwXL29TY76Z2rM5mHXA; +Cc: Davide Libenzi

A few months ago, Davide Libenzi wrote this message on lkml:
  http://marc.info/?l=linux-kernel&m=119368443105320&w=2
but apparently hasn't found time yet to review the man page.

So I figured it might work better if I propose a patch and get Davide to
ack it or suggest further changes.  My proposed patch to epoll(7) is
below.

Feedback would be appreciated.  In particular, I removed reference to
threads in A1 because I was unable to find a test case where I didn't
get EEXIST.  Maybe I'm missing something.

Chris


--- man-pages-2.78/man7/epoll.7.orig	2008-02-11 06:53:44.000000000 -0500
+++ man-pages-2.78/man7/epoll.7	2008-02-21 23:43:53.000000000 -0500
@@ -234,11 +234,11 @@
 What happens if you add the same file descriptor to an epoll set twice?
 .TP
 .B A1
-You will probably get
+You will get
 .BR EEXIST .
-However, it is possible that two
-threads may add the same file descriptor twice.
-This is a harmless condition.
+However, it is possible to add a
+.BR dup (2)
+of that file descriptor to the epoll set.
 .TP
 .B Q2
 Can two
@@ -285,7 +285,15 @@
 sets automatically?
 .TP
 .B A6
-Yes.
+Only if the underlying open file description (see
+.BR open (2))
+is closed.
+For example, if the file descriptor was duplicated with a
+.BR dup (2)
+or
+.BR fork (2)
+call, it will only be removed from epoll sets when all duplicate
+descriptors are closed.
 .TP
 .B Q7
 If more than one event occurs between

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-02-26 15:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-22 14:04 [PATCH] Epoll documentation Chris "ク" Heath
     [not found] ` <1203689065.3021.79.camel-DBi1IKlRe8YXiSwHZUBl+UgmxNRb6L7S@public.gmane.org>
2008-02-22 17:05   ` Davide Libenzi
     [not found]     ` <Pine.LNX.4.64.0802220903530.27173-GPJ85BhbkB8RepQJljzAVbITYcZ0+W3JAL8bYrjMMd8@public.gmane.org>
2008-02-22 18:16       ` Michael Kerrisk
     [not found]         ` <cfd18e0f0802221016o2a3f2b83hfd89f4bf8d35fb1c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-02-26 15:13           ` Michael Kerrisk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox