From: Mark Mielke <mark@mark.mielke.cc>
To: Ben <linux-kernel-junk-email@slimyhorror.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: epoll and fork()
Date: Tue, 2 Mar 2004 10:42:02 -0500 [thread overview]
Message-ID: <20040302154202.GA24226@mark.mielke.cc> (raw)
In-Reply-To: <Pine.LNX.4.58.0403021224520.20736@baphomet.bogo.bogus>
On Tue, Mar 02, 2004 at 12:31:20PM +0000, Ben wrote:
> Is there a defined behaviour for what happens when a process with an epoll
> fd forks?
You found it. :-)
> I've an app that inherits an epoll fd from its parent, and then
> unregisters some file descriptors from the epoll set. This seems to have
> the nasty side effect of unregistering the same file descriptors from the
> parent process as well. Surely this can't be right?
The epoll fd should probably be closed after the fork(), re-allocated,
and then initialized to contain the file descriptors that you want to
watch.
mark
--
mark@mielke.cc/markm@ncf.ca/markm@nortelnetworks.com __________________________
. . _ ._ . . .__ . . ._. .__ . . . .__ | Neighbourhood Coder
|\/| |_| |_| |/ |_ |\/| | |_ | |/ |_ |
| | | | | \ | \ |__ . | | .|. |__ |__ | \ |__ | Ottawa, Ontario, Canada
One ring to rule them all, one ring to find them, one ring to bring them all
and in the darkness bind them...
http://mark.mielke.cc/
prev parent reply other threads:[~2004-03-02 15:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-02 12:31 Ben
2004-03-02 12:59 ` Mihai RUSU
2004-03-02 13:20 ` Richard B. Johnson
2004-03-02 14:02 ` Mihai RUSU
2004-03-02 15:42 ` Mark Mielke [this message]
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=20040302154202.GA24226@mark.mielke.cc \
--to=mark@mark.mielke.cc \
--cc=linux-kernel-junk-email@slimyhorror.com \
--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®