1
0
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:
Timo Sirainen 2001-08-08 22:43:00 +00:00 committed by cras
parent 8a7fa0f047
commit 2aaed8dc0b

View File

@ -164,6 +164,7 @@ static void perl_call_signal(const char *func, int signal_id,
perl_script_find_package(package),
SvPV(ERRSV, n_a));
g_free(package);
rec = NULL;
}
/* 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)
{
GSList **list, *tmp;
GSList **list, *tmp, *next;
int signal_id;
signal_id = signal_get_emitted_id();
list = g_hash_table_lookup(signals[priority],
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;
next = tmp->next;
perl_call_signal(rec->func, signal_id, args);
if (signal_is_stopped(signal_id))
break;