Skip to contentSkip to conversation

Epoll documentation

PATCH In review Chris "ク" Heath 3 participants 4 messages Feb 22, 2008 – Feb 26, 2008 3 messages not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Epoll documentation

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

man7/epoll.7 renamed from man7/epoll.7.orig +13 -5
@@ -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

A message that is not in the archive (sent off-list or not yet received): 1203689065.3021.79.camel-DBi1IKlRe8YXiSwHZUBl+UgmxNRb6L7S@public.gmane.org

#2 lore raw
Quoted 11 lines · Chris "�~B�" Heath

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.

I already sent a patch for that to Michael Kerrisk, short after I posted that message.

- Davide

A message that is not in the archive (sent off-list or not yet received): Pine.LNX.4.64.0802220903530.27173-GPJ85BhbkB8RepQJljzAVbITYcZ0+W3JAL8bYrjMMd8@public.gmane.org

#4 lore raw
Quoted 10 lines · Davide Libenzi
Quoted 8 lines · Chris "ã~B¯" Heath

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.

Quoted 6 lines
Quoted 3 lines

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.

I already sent a patch for that to Michael Kerrisk, short after I posted that message.

That; true. It's in my queue!

Cheers,

Michael

Signature · 5 lines
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html

A message that is not in the archive (sent off-list or not yet received): cfd18e0f0802221016o2a3f2b83hfd89f4bf8d35fb1c-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org

#6 lore raw
Quoted 11 lines · Michael Kerrisk
Quoted 10 lines · Davide Libenzi
Quoted 8 lines · Chris "ã~B¯" Heath

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

I already sent a patch for that to Michael Kerrisk, short after I posted that message.

That; true. It's in my queue!

Davide,

Actually, that was not completely true, as far as I can tell. You sent me a patch for Q6/A6 (which I finally responded to just now), but I can't find any patch for Q1/A1... I'll follow up in the other thread, and CC linux-man and Chris.

Cheers,

Michael

Signature · 5 lines
Michael Kerrisk
Maintainer of the Linux man-pages project
http://www.kernel.org/doc/man-pages/
Want to report a man-pages bug?  Look here:
http://www.kernel.org/doc/man-pages/reporting_bugs.html