summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2012-08-01 17:36:36 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2012-08-01 17:36:36 (GMT)
commit98a387b65f6a9ce36654047704013f3bc4fe9916 (patch)
tree5af60c1a74b6db1ac0f5b2ef944f3b65d7b035a8
parentb303580c7c9b1b5579ec6422773c2874d7a24274 (diff)
downloadcpython-98a387b65f6a9ce36654047704013f3bc4fe9916.zip
cpython-98a387b65f6a9ce36654047704013f3bc4fe9916.tar.gz
cpython-98a387b65f6a9ce36654047704013f3bc4fe9916.tar.bz2
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.
-rw-r--r--Modules/faulthandler.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c
index 6e8fbf7..469e490 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) {