summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2011-05-07 12:43:00 +0200
committerVictor Stinner <victor.stinner@haypocalc.com>2011-05-07 12:43:00 +0200
commit7bba62fd68e3a2c410c37348cf679edea04c7718 (patch)
tree41614a5367bd7c7586df0eb3f53e3c7db7b3f362 /Python
parentc925617b5455867b7b393c6ca66f133aab450a6b (diff)
downloadcpython-git-7bba62fd68e3a2c410c37348cf679edea04c7718.tar.gz
faulthandler: dump all threads by default
* Set the default value of all_threads arguments to True * Py_FatalError() dumps all threads, instead of only the current thread Dump only the current thread is not reliable. In some cases, Python is unable to retrieve the state of the current thread and so is unable to dump the traceback. faulthandler keeps a reference to the interpreter and so is always able to dump the traceback of all threads.
Diffstat (limited to 'Python')
-rw-r--r--Python/pythonrun.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c
index ebc4f1cf17..6ebc823b80 100644
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -2144,7 +2144,7 @@ Py_FatalError(const char *msg)
if (tstate != NULL) {
fputc('\n', stderr);
fflush(stderr);
- _Py_DumpTraceback(fd, tstate);
+ _Py_DumpTracebackThreads(fd, tstate->interp, tstate);
}
_PyFaulthandler_Fini();
}