Re: Fw: epoll and fork()

From: Davide Libenzi
Date: Wed Mar 03 2004 - 05:31:39 EST


On Tue, 2 Mar 2004, Ben wrote:

> 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.

Note that if the parent or the child does close an fd, this does not get
automatically unregistered from the epoll fd of the other task. An fd can
be unregistered from an epoll fd either explicitly with an epoll_ctl() or
implicitly when the use count of the underlying file* goes to zero.



- Davide


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