From: Victor Stinner Date: Wed, 1 Aug 2012 17:36:36 +0000 (+0200) Subject: Fix the user signal handler of faulthandler X-Git-Tag: v3.3.0b2~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=98a387b65f6a9ce36654047704013f3bc4fe9916;p=python Fix the user signal handler of faulthandler Don't exit the tstate is NULL to restore the errno and chain the signal handler if needed. --- diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 6e8fbf78fd..469e490268 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -653,9 +653,8 @@ faulthandler_user(int signum) if (user->all_threads) _Py_DumpTracebackThreads(user->fd, user->interp, tstate); else { - if (tstate == NULL) - return; - _Py_DumpTraceback(user->fd, tstate); + if (tstate != NULL) + _Py_DumpTraceback(user->fd, tstate); } #ifdef HAVE_SIGACTION if (user->chain) {