From fd13e4046f508e9ebe4eb463966ff2858f053cdd Mon Sep 17 00:00:00 2001 From: Farow Date: Wed, 9 Oct 2013 11:33:10 +0300 Subject: [PATCH] Perl: fixed crash when a script exits abnormally --- plugins/perl/perl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/perl/perl.c b/plugins/perl/perl.c index f3ce8883..76722f7f 100644 --- a/plugins/perl/perl.c +++ b/plugins/perl/perl.c @@ -408,7 +408,7 @@ timer_cb (void *userdata) } set_current_package (data->package); - count = call_sv (data->callback, G_EVAL); + count = call_sv (data->callback, G_EVAL | G_KEEPERR); set_current_package (&PL_sv_undef); SPAGAIN; @@ -467,7 +467,7 @@ server_cb (char *word[], char *word_eol[], void *userdata) data->depth++; set_current_package (data->package); - count = call_sv (data->callback, G_EVAL); + count = call_sv (data->callback, G_EVAL | G_KEEPERR); set_current_package (&PL_sv_undef); data->depth--; SPAGAIN; @@ -516,7 +516,7 @@ command_cb (char *word[], char *word_eol[], void *userdata) data->depth++; set_current_package (data->package); - count = call_sv (data->callback, G_EVAL); + count = call_sv (data->callback, G_EVAL | G_KEEPERR); set_current_package (&PL_sv_undef); data->depth--; SPAGAIN; @@ -592,7 +592,7 @@ print_cb (char *word[], void *userdata) data->depth++; set_current_package (data->package); - count = call_sv (data->callback, G_EVAL); + count = call_sv (data->callback, G_EVAL | G_KEEPERR); set_current_package (&PL_sv_undef); data->depth--; SPAGAIN;