diff Python/pythonrun.c @ 69888:8752a81ada2d

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.
author Victor Stinner <victor.stinner@haypocalc.com>
date Sat, 07 May 2011 12:43:00 +0200
parents c892b0321d23
children 94e3c44b0662
line wrap: on
line diff
--- a/Python/pythonrun.c	Sat May 07 12:20:11 2011 +0200
+++ b/Python/pythonrun.c	Sat May 07 12:43:00 2011 +0200
@@ -2144,7 +2144,7 @@
         if (tstate != NULL) {
             fputc('\n', stderr);
             fflush(stderr);
-            _Py_DumpTraceback(fd, tstate);
+            _Py_DumpTracebackThreads(fd, tstate->interp, tstate);
         }
         _PyFaulthandler_Fini();
     }