On Tue, Oct 19, 2010 at 10:54 AM, Gustavo Sverzut Barbieri
<[email protected]> 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)

argh... while that and most of other fds should be defined with
CLOEXEC, the problem is that we DON'T exec... but just fork and dlopen
:-/

sorry, then we could go with an extra call to warn user or just keep
the auto-hack... but I'd turn the auto-hack a main-loop thing that
would enable other stuff to be hooked into the "I'm being used from
another process!"


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