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.
This commit is contained in:
Victor Stinner 2012-08-01 19:36:36 +02:00
parent b303580c7c
commit 98a387b65f

View file

@ -653,8 +653,7 @@ faulthandler_user(int signum)
if (user->all_threads) if (user->all_threads)
_Py_DumpTracebackThreads(user->fd, user->interp, tstate); _Py_DumpTracebackThreads(user->fd, user->interp, tstate);
else { else {
if (tstate == NULL) if (tstate != NULL)
return;
_Py_DumpTraceback(user->fd, tstate); _Py_DumpTraceback(user->fd, tstate);
} }
#ifdef HAVE_SIGACTION #ifdef HAVE_SIGACTION