From d3493df032c07bde80265a258034e010023d6c51 Mon Sep 17 00:00:00 2001 From: Unbit Date: Wed, 26 Feb 2014 17:06:21 +0100 Subject: [PATCH] do not expode if Devel::StackTrace is missing --- plugins/psgi/psgi_loader.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/psgi/psgi_loader.c b/plugins/psgi/psgi_loader.c index df9ff431..bc2515a0 100644 --- a/plugins/psgi/psgi_loader.c +++ b/plugins/psgi/psgi_loader.c @@ -441,18 +441,14 @@ int init_psgi_app(struct wsgi_request *wsgi_req, char *app, uint16_t app_len, Pe if (!uperl.no_die_catch) { perl_eval_pv("use Devel::StackTrace; $SIG{__DIE__} = sub { print Devel::StackTrace->new()->as_string() };", 0); + if(SvTRUE(ERRSV)) { + uwsgi_log("%s", SvPV_nolen(ERRSV)); + } } PERL_SET_CONTEXT(interpreters[0]); } - if(SvTRUE(ERRSV)) { - uwsgi_log("%s", SvPV_nolen(ERRSV)); - free(callables); - uwsgi_perl_free_stashes(); - goto clear; - } - if (uwsgi_apps_cnt >= uwsgi.max_apps) { uwsgi_log("ERROR: you cannot load more than %d apps in a worker\n", uwsgi.max_apps); goto clear;