mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davide Libenzi <davidel@xmailserver.org>
To: Valdis.Kletnieks@vt.edu
Cc: 7eggert@gmx.de, Michael Kerrisk <mtk.manpages@googlemail.com>,
	Pierre Habouzit <madcoder@debian.org>,
	lkml <linux-kernel@vger.kernel.org>,
	Eric Dumazet <dada1@cosmosbay.com>,
	Marc Lehmann <schmorp@schmorp.de>,
	David Schwartz <davids@webmaster.com>
Subject: Re: epoll and shared fd's
Date: Thu, 28 Feb 2008 11:27:45 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0802281124330.7660@alien.or.mcafeemobile.com> (raw)
In-Reply-To: <19752.1204206788@turing-police.cc.vt.edu>

On Thu, 28 Feb 2008, Valdis.Kletnieks@vt.edu wrote:

> On Tue, 26 Feb 2008 19:16:30 +0100, Bodo Eggert said:
> > Michael Kerrisk <mtk.manpages@googlemail.com> wrote:
> 
> > >               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.
> 
> Is it worth making special mention of the case where a process gets events
> for a FD that it has closed, because a parent or child process still has
> an inherited copy of the FD still open?

And for all the others, there's epoll_ctl(EPOLL_CTL_DEL) :)
The close(2) (f_op->release actually) hook is for cleanup semantics. If 
you play with multiple processes, just use epoll_ctl(EPOLL_CTL_DEL) and 
you'll be fine.



- Davide



  parent reply	other threads:[~2008-02-28 19:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <9MZLT-1YO-33@gated-at.bofh.it>
     [not found] ` <9N6Ng-5tn-21@gated-at.bofh.it>
     [not found]   ` <9P5WE-33i-11@gated-at.bofh.it>
     [not found]     ` <9Pk9l-1KA-1@gated-at.bofh.it>
     [not found]       ` <9PNNZ-b0-5@gated-at.bofh.it>
     [not found]         ` <a19Lb-1F0-13@gated-at.bofh.it>
     [not found]           ` <a19Lb-1F0-11@gated-at.bofh.it>
2008-02-26 18:16             ` Bodo Eggert
2008-02-28 12:10               ` Michael Kerrisk
2008-02-28 19:17                 ` Bodo Eggert
2008-02-28 19:30                   ` Davide Libenzi
2008-02-28 13:53               ` Valdis.Kletnieks
2008-02-28 15:08                 ` Michael Kerrisk
2008-02-28 19:27                 ` Davide Libenzi [this message]
2008-01-18 13:43 Pierre Habouzit
2008-01-18 21:10 ` Davide Libenzi
2008-01-24  8:40   ` Pierre Habouzit
2008-01-24 23:57     ` Davide Libenzi
2008-01-26  7:37       ` Michael Kerrisk
     [not found]         ` <Pine.LNX.4.64.0801261308270.10472@alien.or.mcafeemobile.com>
2008-02-26 15:13           ` Michael Kerrisk
2008-02-26 19:04             ` Davide Libenzi
2008-02-26 19:14               ` Michael Kerrisk
2008-02-26 19:31                 ` 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=Pine.LNX.4.64.0802281124330.7660@alien.or.mcafeemobile.com \
    --to=davidel@xmailserver.org \
    --cc=7eggert@gmx.de \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=dada1@cosmosbay.com \
    --cc=davids@webmaster.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madcoder@debian.org \
    --cc=mtk.manpages@googlemail.com \
    --cc=schmorp@schmorp.de \
    /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®