diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-07 10:43:00 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-05-07 10:43:00 (GMT) |
commit | 7bba62fd68e3a2c410c37348cf679edea04c7718 (patch) | |
tree | 41614a5367bd7c7586df0eb3f53e3c7db7b3f362 /Python/pythonrun.c | |
parent | c925617b5455867b7b393c6ca66f133aab450a6b (diff) | |
download | cpython-7bba62fd68e3a2c410c37348cf679edea04c7718.zip cpython-7bba62fd68e3a2c410c37348cf679edea04c7718.tar.gz cpython-7bba62fd68e3a2c410c37348cf679edea04c7718.tar.bz2 |
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/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index ebc4f1c..6ebc823 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(); } |