On Tue, Oct 19, 2010 at 11:02 AM, Mike McCormack
<[email protected]> wrote:
> On 10/19/2010 09:54 PM, Gustavo Sverzut Barbieri wrote:
>>
>> On Tue, Oct 19, 2010 at 10:47 AM, Mike McCormack
>> <[email protected]>  wrote:
>>>
>>> Hi Raster,
>>>
>>> This is an attempt to fix the epoll/fork() issue reported to me where
>>> we end up with a single epoll fd shared between two processes after  a
>>> fork() in E.
>>>
>>> I've tested with elementary test in epoll and non-epoll combinations,
>>> and all appears to be well.  Please check it solves the issue you saw,
>>> and reformat the code as you see fit... ;-)
>>
>> Well, it may work, but this is not the way to go with it. IMO the
>> correct way would be to tell for sure ecore it is being executed from
>> a fork, but another option is to use epoll_create1(EPOLL_CLOEXEC),
>> then handle the EBADF in select, recreating it upon errors (just be
>> warned that may happen that the fd number is reused by the app if it
>> open fds before going back to main loop)
>
> Well, the problem is that there's no exec().  Somewhere E does a fork()
> and dlopen() to load a plugin quickly.
>
> I could add checks around all the forks in the codebase, but this way seems
> more reliable.

AFAIR the problem is in elementary's quicklaunch, not E17. But yeah,
it would be a fragile solution... still thinking about a better
solution.


> The EBADF problem can be solved by reinitializing epoll when we get that
> return from epoll_add, though the root cause is closing an fd before
> removing it from ecore.

okay, that seems right as well (2 problems to solve).


-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: [email protected]
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly 
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to