diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index e403a0d1fd..6c533335be 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -257,6 +257,8 @@ ecore_init(void) vpath = eo_add(EFL_VPATH_CORE_CLASS, NULL); if (vpath) efl_vpath_manager_register(EFL_VPATH_MANAGER_CLASS, 0, vpath); + _mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL); + _ecore_signal_init(); #ifndef HAVE_EXOTIC _ecore_exe_init(); diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c index 93f1d1cf60..760a187a96 100644 --- a/src/lib/ecore/ecore_main.c +++ b/src/lib/ecore/ecore_main.c @@ -1030,6 +1030,8 @@ quit: void _ecore_main_loop_init(void) { + // Please note that this function is being also called in case of a bad fd to reset the main loop. + DBG("_ecore_main_loop_init"); epoll_fd = epoll_create(1); if ((epoll_fd < 0) && HAVE_EPOLL) @@ -1117,7 +1119,7 @@ _ecore_main_loop_init(void) DBG("loaded dlsyms uv"); } #endif - + /* setup for the g_main_loop only integration */ #ifdef USE_G_MAIN_LOOP ecore_glib_source = g_source_new(&ecore_gsource_funcs, sizeof (GSource)); @@ -1155,13 +1157,13 @@ _ecore_main_loop_init(void) #endif detect_time_changes_start(); - - _mainloop_singleton = eo_add(EFL_LOOP_CLASS, NULL); } void _ecore_main_loop_shutdown(void) { + // Please note that _ecore_main_loop_shutdown is called in cycle to restart the main loop in case of a bad fd + #ifdef USE_G_MAIN_LOOP if (ecore_glib_source) {