forked from enlightenment/efl
stop leaking every ecore system signal event.
People, when you go and change ecore_event_add() to _ecore_event_add(), please NOTICE THAT THE FREE FUNCTION IS NOT AUTOMATICALLY SPECIFIED! So specify these functions to _ecore_event_add() to stop leaking every signal we receive from system. SVN revision: 70177
This commit is contained in:
parent
e107124555
commit
59a7bda1d9
|
@ -615,3 +615,4 @@
|
||||||
|
|
||||||
* remove EAPI from _ecore_event_signal_user_new(). It should never
|
* remove EAPI from _ecore_event_signal_user_new(). It should never
|
||||||
be exported outside of libecore.so
|
be exported outside of libecore.so
|
||||||
|
* stop leaking every system signal event.
|
||||||
|
|
|
@ -133,6 +133,13 @@ _ecore_signal_count_get(void)
|
||||||
return sig_count;
|
return sig_count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_signal_generic_free(void *data __UNUSED__,
|
||||||
|
void *event)
|
||||||
|
{
|
||||||
|
free(event);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_ecore_signal_call(void)
|
_ecore_signal_call(void)
|
||||||
{
|
{
|
||||||
|
@ -248,7 +255,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigusr1_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigusr1_info[n].si_signo))
|
||||||
e->data = sigusr1_info[n];
|
e->data = sigusr1_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -269,7 +277,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigusr2_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigusr2_info[n].si_signo))
|
||||||
e->data = sigusr2_info[n];
|
e->data = sigusr2_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_USER, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_USER, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -288,7 +297,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sighup_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sighup_info[n].si_signo))
|
||||||
e->data = sighup_info[n];
|
e->data = sighup_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_HUP, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -309,7 +319,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigquit_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigquit_info[n].si_signo))
|
||||||
e->data = sigquit_info[n];
|
e->data = sigquit_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +341,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigint_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigint_info[n].si_signo))
|
||||||
e->data = sigint_info[n];
|
e->data = sigint_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -351,7 +363,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigterm_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigterm_info[n].si_signo))
|
||||||
e->data = sigterm_info[n];
|
e->data = sigterm_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
@ -371,7 +384,8 @@ _ecore_signal_call(void)
|
||||||
if ((n < MAXSIGQ) && (sigpwr_info[n].si_signo))
|
if ((n < MAXSIGQ) && (sigpwr_info[n].si_signo))
|
||||||
e->data = sigpwr_info[n];
|
e->data = sigpwr_info[n];
|
||||||
|
|
||||||
_ecore_event_add(ECORE_EVENT_SIGNAL_POWER, e, NULL, NULL);
|
_ecore_event_add(ECORE_EVENT_SIGNAL_POWER, e,
|
||||||
|
_ecore_signal_generic_free, NULL);
|
||||||
}
|
}
|
||||||
sig_count--;
|
sig_count--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue