On Mon, 13 Aug 2012 08:32:27 +0700 Cedric BAIL <moa.blueb...@gmail.com> said:
> Cedric Bail > On Aug 12, 2012 9:00 PM, "Gustavo Sverzut Barbieri" <barbi...@profusion.mobi> > wrote: > > > > On Sunday, August 12, 2012, Vincent Torri wrote: > > > > > 1) aren't we in feature freeze ? > > It's a bug fix for elementary quicklaunch not a feature. > > > > 2) missing @since somewhere > > Sorry no access to SVN for a week. wot? haven't u figured out svn-over-email? :) > > 3) I believe it's something bad to have manual. Users that do fork on > their > > own should get things working automatically. > > I didn't find a proper way. Bugs case is when you fork an ecore apps, if > you have a better idea feel free. it may be possible by every api call checking getpid() compared to the pid at ecore_init() time and if this every changes call this internally. that's a lot of getpid's... :) this is probably the better solution as it's a special case that u fork() but DON'T exec() something soon after (ie u may run the ecore mainloop again etc.). > Cedric > > > > > > > > > > Vincent > > > > > > On Thu, Aug 9, 2012 at 2:17 PM, Enlightenment SVN > > > <no-re...@enlightenment.org> wrote: > > > > Log: > > > > ecore: add ecore_fork_reset() > > > > > > > > > > > > Author: cedric > > > > Date: 2012-08-09 05:17:47 -0700 (Thu, 09 Aug 2012) > > > > New Revision: 75045 > > > > Trac: http://trac.enlightenment.org/e/changeset/75045 > > > > > > > > Modified: > > > > trunk/ecore/ChangeLog trunk/ecore/NEWS > > > trunk/ecore/src/lib/ecore/Ecore.h trunk/ecore/src/lib/ecore/ecore.c > > > > > > > > Modified: trunk/ecore/ChangeLog > > > > =================================================================== > > > > --- trunk/ecore/ChangeLog 2012-08-09 12:12:29 UTC (rev 75044) > > > > +++ trunk/ecore/ChangeLog 2012-08-09 12:17:47 UTC (rev 75045) > > > > @@ -851,3 +851,4 @@ > > > > 2012-08-09 Cedric Bail > > > > > > > > * Correctly shutdown Ecore_Thread. > > > > + * Add a way to reset Ecore_Thread internal pipe after a fork > via > > > ecore_fork_reset. > > > > > > > > Modified: trunk/ecore/NEWS > > > > =================================================================== > > > > --- trunk/ecore/NEWS 2012-08-09 12:12:29 UTC (rev 75044) > > > > +++ trunk/ecore/NEWS 2012-08-09 12:17:47 UTC (rev 75045) > > > > @@ -6,6 +6,7 @@ > > > > Additions: > > > > * ecore: > > > > - Add ecore_main_fd_handler_file_add() > > > > + - Add ecore_fork_reset() > > > > * ecore_evas: > > > > - Add transparency support on Windows (GDI engine only) > > > > - Add API functions to get/set an Ecore_Evas's profile. > > > > > > > > Modified: trunk/ecore/src/lib/ecore/Ecore.h > > > > =================================================================== > > > > --- trunk/ecore/src/lib/ecore/Ecore.h 2012-08-09 12:12:29 UTC (rev > > > 75044) > > > > +++ trunk/ecore/src/lib/ecore/Ecore.h 2012-08-09 12:17:47 UTC (rev > > > 75045) > > > > @@ -373,13 +373,14 @@ > > > > #endif > > > > > > > > /** > > > > - * @defgroup Ecore_Init_Group Ecore initialization and shutdown > > > functions. > > > > + * @defgroup Ecore_Init_Group Ecore initialization, shutdown > functions > > > and reset on fork. > > > > * > > > > * @{ > > > > */ > > > > > > > > EAPI int ecore_init(void); > > > > EAPI int ecore_shutdown(void); > > > > +EAPI void ecore_fork_reset(void); > > > > > > > > /** > > > > * @} > > > > > > > > Modified: trunk/ecore/src/lib/ecore/ecore.c > > > > =================================================================== > > > > --- trunk/ecore/src/lib/ecore/ecore.c 2012-08-09 12:12:29 UTC (rev > > > 75044) > > > > +++ trunk/ecore/src/lib/ecore/ecore.c 2012-08-09 12:17:47 UTC (rev > > > 75045) > > > > @@ -80,6 +80,7 @@ > > > > static Eina_List *_thread_cb = NULL; > > > > static Ecore_Pipe *_thread_call = NULL; > > > > static Eina_Lock _thread_safety; > > > > +static const int wakeup = 42; > > > > > > > > static int _thread_loop = 0; > > > > static Eina_Lock _thread_mutex; > > > > @@ -175,11 +176,8 @@ > > > > eina_condition_new(&_thread_cond, &_thread_mutex); > > > > eina_lock_new(&_thread_feedback_mutex); > > > > eina_condition_new(&_thread_feedback_cond, > &_thread_feedback_mutex); > > > > - if (!_thread_call) > > > > - { > > > > - _thread_call = ecore_pipe_add(_thread_callback, NULL); > > > > - eina_lock_new(&_thread_safety); > > > > - } > > > > + _thread_call = ecore_pipe_add(_thread_callback, NULL); > > > > + eina_lock_new(&_thread_safety); > > > > > > > > eina_lock_new(&_thread_id_lock); > > > > > > > > @@ -307,12 +305,23 @@ > > > > return _ecore_init_count; > > > > } > > > > > > > > +EAPI void > > > > +ecore_fork_reset(void) > > > > +{ > > > > + eina_lock_take(&_thread_safety); > > > > + > > > > + ecore_pipe_del(_thread_call); > > > > + _thread_call = ecore_pipe_add(_thread_callback, NULL); > > > > + /* If there was something in the pipe, trigger a wakeup again */ > > > > + if (_thread_cb) ecore_pipe_write(_threenlightenment-devel mailing > > > list > > > enlightenment-devel@lists.sourceforge.net <javascript:;> > > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > > > > > > > -- > > Gustavo Sverzut Barbieri > > http://profusion.mobi embedded systems > > -------------------------------------- > > MSN: barbi...@gmail.com > > Skype: gsbarbieri > > Mobile: +55 (19) 9225-2202 > > > ------------------------------------------------------------------------------ > > Live Security Virtual Conference > > Exclusive live event will cover all the ways today's security and > > threat landscape has changed and how IT managers can respond. Discussions > > will include endpoint security, mobile security and the latest in malware > > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > _______________________________________________ > > enlightenment-devel mailing list > > enlightenment-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) ras...@rasterman.com ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel