diff --git a/src/lib/ecore/ecore_signal.c b/src/lib/ecore/ecore_signal.c index e4f33de815..1d9872a459 100644 --- a/src/lib/ecore/ecore_signal.c +++ b/src/lib/ecore/ecore_signal.c @@ -41,7 +41,7 @@ typedef struct _Signal_Data } Signal_Data; static Eina_Bool -_ecore_signal_pipe_read(void) +_ecore_signal_pipe_read(Eo *obj) { Signal_Data sdata; int ret; @@ -69,6 +69,14 @@ _ecore_signal_pipe_read(void) ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, _ecore_signal_generic_free, NULL); } + Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS); + if (loop) + { + if (sdata.sig == SIGUSR1) + efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR1, NULL); + else + efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_USR2, NULL); + } } break; case SIGHUP: @@ -80,6 +88,9 @@ _ecore_signal_pipe_read(void) ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e, _ecore_signal_generic_free, NULL); } + Eo *loop = efl_provider_find(obj, EFL_LOOP_CLASS); + if (loop) + efl_event_callback_call(loop, EFL_LOOP_EVENT_SIGNAL_HUP, NULL); } break; case SIGQUIT: @@ -120,7 +131,7 @@ _ecore_signal_pipe_read(void) static void _ecore_signal_cb_read(void *data EINA_UNUSED, const Efl_Event *event EINA_UNUSED) { - while (_ecore_signal_pipe_read()); + while (_ecore_signal_pipe_read(event->object)); } static void diff --git a/src/lib/ecore/efl_loop.eo b/src/lib/ecore/efl_loop.eo index c91709509a..66ff276f0e 100644 --- a/src/lib/ecore/efl_loop.eo +++ b/src/lib/ecore/efl_loop.eo @@ -151,6 +151,9 @@ class Efl.Loop (Efl.Object) pause; [[Called when the window is not going be displayed for some time]] resume; [[Called before a window is rendered after a pause event]] terminate; [[Called before starting the shutdown of Elementary]] + signal,usr1; [[System specific, but on unix maps to SIGUSR1 signal to the process - only called on main loop object]] + signal,usr2; [[System specific, but on unix maps to SIGUSR2 signal to the process - only called on main loop object]] + signal,hup; [[System specific, but on unix maps to SIGHUP signal to the process - only called on main loop object]] } implements { Efl.Object.constructor;