LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Passing epoll file descriptors across Unix domain sockets
@ 2008-02-29 16:30 Michael Kerrisk
2008-02-29 19:20 ` Davide Libenzi
0 siblings, 1 reply; 2+ messages in thread
From: Michael Kerrisk @ 2008-02-29 16:30 UTC (permalink / raw)
To: Davide Libenzi; +Cc: lkml
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?
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Passing epoll file descriptors across Unix domain sockets
2008-02-29 16:30 Passing epoll file descriptors across Unix domain sockets Michael Kerrisk
@ 2008-02-29 19:20 ` Davide Libenzi
0 siblings, 0 replies; 2+ messages in thread
From: Davide Libenzi @ 2008-02-29 19:20 UTC (permalink / raw)
To: Michael Kerrisk; +Cc: lkml
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-02-29 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 16:30 Passing epoll file descriptors across Unix domain sockets Michael Kerrisk
2008-02-29 19:20 ` Davide Libenzi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).