mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Irssi crashed if script died in a signal handler.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1730 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
8a7fa0f047
commit
2aaed8dc0b
@ -164,6 +164,7 @@ static void perl_call_signal(const char *func, int signal_id,
|
|||||||
perl_script_find_package(package),
|
perl_script_find_package(package),
|
||||||
SvPV(ERRSV, n_a));
|
SvPV(ERRSV, n_a));
|
||||||
g_free(package);
|
g_free(package);
|
||||||
|
rec = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* restore arguments the perl script modified */
|
/* restore arguments the perl script modified */
|
||||||
@ -210,15 +211,16 @@ static void perl_call_signal(const char *func, int signal_id,
|
|||||||
|
|
||||||
static void sig_func(int priority, gconstpointer *args)
|
static void sig_func(int priority, gconstpointer *args)
|
||||||
{
|
{
|
||||||
GSList **list, *tmp;
|
GSList **list, *tmp, *next;
|
||||||
int signal_id;
|
int signal_id;
|
||||||
|
|
||||||
signal_id = signal_get_emitted_id();
|
signal_id = signal_get_emitted_id();
|
||||||
list = g_hash_table_lookup(signals[priority],
|
list = g_hash_table_lookup(signals[priority],
|
||||||
GINT_TO_POINTER(signal_id));
|
GINT_TO_POINTER(signal_id));
|
||||||
for (tmp = list == NULL ? NULL : *list; tmp != NULL; tmp = tmp->next) {
|
for (tmp = list == NULL ? NULL : *list; tmp != NULL; tmp = next) {
|
||||||
PERL_SIGNAL_REC *rec = tmp->data;
|
PERL_SIGNAL_REC *rec = tmp->data;
|
||||||
|
|
||||||
|
next = tmp->next;
|
||||||
perl_call_signal(rec->func, signal_id, args);
|
perl_call_signal(rec->func, signal_id, args);
|
||||||
if (signal_is_stopped(signal_id))
|
if (signal_is_stopped(signal_id))
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user