lkml.org 
[lkml]   [2004]   [Mar]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Fw: epoll and fork()
    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/

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:01    [W:0.030 / U:34.552 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site