mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael Kerrisk" <mtk.manpages@googlemail.com>
To: "Davide Libenzi" <davidel@xmailserver.org>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Passing epoll file descriptors across Unix domain sockets
Date: Fri, 29 Feb 2008 17:30:12 +0100	[thread overview]
Message-ID: <cfd18e0f0802290830y46d1b029hdcbbe2070f8d3773@mail.gmail.com> (raw)

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

             reply	other threads:[~2008-02-29 16:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-29 16:30 Michael Kerrisk [this message]
2008-02-29 19:20 ` Davide Libenzi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cfd18e0f0802290830y46d1b029hdcbbe2070f8d3773@mail.gmail.com \
    --to=mtk.manpages@googlemail.com \
    --cc=davidel@xmailserver.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®