From: Mark Mielke <mark@mark.mielke.cc>
To: Ben <linux-kernel-junk-email@slimyhorror.com>
Cc: Davide Libenzi <davidel@xmailserver.org>,
Andrew Morton <akpm@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Fw: epoll and fork()
Date: Tue, 2 Mar 2004 10:44:40 -0500 [thread overview]
Message-ID: <20040302154440.GB24226@mark.mielke.cc> (raw)
In-Reply-To: <Pine.LNX.4.58.0403021527360.20736@baphomet.bogo.bogus>
On Tue, Mar 02, 2004 at 03:38:04PM +0000, Ben wrote:
> I was thinking that epoll should behave like a file descriptor (i.e. a
> child can close an inherited fd without affecting the parent), simply
> because the only connection a process has with epoll is the file
> descriptor. I suppose if you think of epoll_ctl() and epoll_wait() as
> write()s and read()s on the file descriptor, then it makes sense that
> these operations would affect both processes.
> It still feels 'wrong' though :)
If you read from a file descriptor in one process, the file pointer is
moved, and the read from the other process will not get the same bytes
twice.
Seems 'right', although inconvenient might be a better conclusion than
unintuitive... :-)
I wonder if this 'feature' could be taken advantage of somehow? One could
monitor the state of a file descriptor without having access to the file
descriptor... Hmm...
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/
next prev parent reply other threads:[~2004-03-02 15:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20040302050233.3b33188b.akpm@osdl.org>
2004-03-02 15:05 ` Davide Libenzi
2004-03-02 15:25 ` Chris Friesen
2004-03-03 10:38 ` Davide Libenzi
2004-03-02 15:38 ` Ben
2004-03-02 15:44 ` Mark Mielke [this message]
2004-03-03 10:29 ` 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=20040302154440.GB24226@mark.mielke.cc \
--to=mark@mark.mielke.cc \
--cc=akpm@osdl.org \
--cc=davidel@xmailserver.org \
--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®