Commit 98a387b6 authored by Victor Stinner's avatar Victor Stinner

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.
parent b303580c
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment