login
Header Space

 
 

Re: epoll and shared fd's

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Davide Libenzi <davidel@...>
Cc: Pierre Habouzit <madcoder@...>, lkml <linux-kernel@...>, Eric Dumazet <dada1@...>, Marc Lehmann <schmorp@...>, David Schwartz <davids@...>
Date: Tuesday, February 26, 2008 - 11:13 am

Following up after quite some time:

Davide Libenzi wrote:

Davide,

Two points.

a) I did a

s/internal kernel handle/open file description/

since that is the POSIX term for the internal handle.

b) It seems to me that you text doesn't quite make the point explicit
enough.  I've tried to rewrite it; could you please check:

       A6     Yes, but be aware of the following point.  A  file
              descriptor is a reference to an open file descrip-
              tion (see  open(2)).   Whenever  a  descriptor  is
              duplicated  via dup(2), dup2(2), fcntl(2) F_DUPFD,
              or fork(2), a new file descriptor referring to the
              same  open  file  description is created.  An open
              file description continues to exist until all file
              descriptors referring to it have been closed.  The
              epoll  interface  automatically  removes  a   file
              descriptor  from  an  epoll set only after all the
              file descriptors referring to the underlying  open
              file  handle  have  been  closed.  This means that
              even after a file descriptor that is  part  of  an
              epoll  set has been closed, events may be reported
              for that file descriptor if other file descriptors
              referring  to the same underlying file description
              remain open.

Does that seem okay?  I plan to include the text in man-pages-2.79.

Was there some reason why removing a file descriptor couldn't have been
made to do the "expected" thing (i.e., remove notifications for that file
descriptor, regardless of whether the underlying file description remains
open)?

Cheers,

Michael

-- 
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


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: epoll and shared fd's, Michael Kerrisk, (Tue Feb 26, 11:13 am)
Re: epoll and shared fd's, Davide Libenzi, (Tue Feb 26, 3:04 pm)
Re: epoll and shared fd's, Michael Kerrisk, (Tue Feb 26, 3:14 pm)
Re: epoll and shared fd's, Davide Libenzi, (Tue Feb 26, 3:31 pm)
speck-geostationary