Thread (2 messages) 2 messages, 2 authors, 2008-02-29

Re: Passing epoll file descriptors across Unix domain sockets

From: Davide Libenzi <hidden>
Date: 2008-02-29 19:20:55

On Fri, 29 Feb 2008, Michael Kerrisk wrote:
Hi Davide,

After all of the recent discussions about epoll, I've been reviewing
other parts of the epoll.7 man page.  In that page there is the
following:

       Q5  Can  I  send  the  epoll  file descriptor over a Unix
           domain socket to another process?

       A5  No.

This does not seem accurate.  I can understand that it makes no sense
to pass a an epoll file descriptor over a Unix domain socket, because
the receiving process does not have the file descriptors that are in
the epoll set.

However, it is indeed possible (no errors result) to pass an epoll fd
over a Unix doman socket using SCM_RIGHTS.  (I have just now tested
this.)

Can you clarify?  I suspect the text should really read:

       Q5  Can  I  send  an  epoll  file  descriptor over a Unix
           domain socket to another process?

       A5  Yes, but it does not make sense to do this, since the
           receiving  process  would not have copies of the file
           descriptors in the epoll set.

Does that seem okay?
Looks okay to me.



- Davide

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help