login
Header Space

 
 

Re: epoll design problems with common fork/exec patterns

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Michael Kerrisk <mtk.manpages@...>
Cc: <chris@...>, David Schwartz <davids@...>, <dada1@...>, Linux-Kernel@Vger. Kernel. Org <linux-kernel@...>, <linux-man@...>
Date: Thursday, February 28, 2008 - 3:23 pm

On Thu, 28 Feb 2008, Michael Kerrisk wrote:


Have you ever tried to think what it means for different *processes* 
sharing a single epoll fd and doing epoll_wait() over it?
Most common case is a single event fetch thread plus dispatch. Going to 
epoll_wait() over a single epoll fd from many *threads* is very much 
possible, but requires care (news at 11, system software development 
requires care too).
Sharing a single epoll fd (by the means of any process sharing it doing 
add/wait) from different *processes* makes almost no sense at all.
"a child process cannot add the duplicate file descriptor to the epoll 
set" ... how do you expect the parent (that doesn't even have the new fd 
mapped) to react to such events?
If the next question is "But then why we made the epoll fd inheritable?", 
the answer is, because it makes sense in many cases for a parent to hand 
over an fd set to a child.




I think we already went over this, and I think I clearly explained you the 
reasons of not hooking into sys_close.



- Davide


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
epoll design problems with common fork/exec patterns, Marc Lehmann, (Sat Oct 27, 2:22 am)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Sat Oct 27, 12:59 pm)
RE: epoll design problems with common fork/exec patterns, David Schwartz, (Sun Oct 28, 12:47 am)
RE: epoll design problems with common fork/exec patterns, Davide Libenzi, (Sun Oct 28, 2:48 pm)
RE: epoll design problems with common fork/exec patterns, David Schwartz, (Sun Oct 28, 5:04 pm)
RE: epoll design problems with common fork/exec patterns, Davide Libenzi, (Mon Oct 29, 2:55 pm)
Re: epoll design problems with common fork/exec patterns, Michael Kerrisk, (Tue Feb 26, 11:13 am)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Tue Feb 26, 2:51 pm)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Wed Feb 27, 3:35 pm)
Re: epoll design problems with common fork/exec patterns, Michael Kerrisk, (Thu Feb 28, 9:12 am)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Thu Feb 28, 3:23 pm)
Re: epoll design problems with common fork/exec patterns, Michael Kerrisk, (Fri Feb 29, 11:46 am)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Fri Feb 29, 3:19 pm)
Re: epoll design problems with common fork/exec patterns, Michael Kerrisk, (Fri Feb 29, 3:54 pm)
Re: epoll design problems with common fork/exec patterns, Michael Kerrisk, (Thu Feb 28, 9:23 am)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Thu Feb 28, 3:34 pm)
Re: epoll design problems with common fork/exec patterns, Willy Tarreau, (Sat Oct 27, 1:38 pm)
Re: epoll design problems with common fork/exec patterns, Davide Libenzi, (Sat Oct 27, 2:01 pm)
speck-geostationary