mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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:
parent
b303580c7c
commit
98a387b65f
1 changed files with 2 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue