Commit Graph

465 Commits

Author SHA1 Message Date
Victor Stinner 449b271799 Issue #18174: Explain why is_valid_fd() uses dup() instead of fstat() 2015-09-29 13:59:50 +02:00
Victor Stinner cd6e69439c Issue #25160: Fix import_init() comments and messages
import_init() imports the "_imp" module, not the "imp" module.
2015-09-18 09:11:57 +02:00
Victor Stinner 874dbe895d Merge 3.4 (create_stdio) 2015-09-04 17:29:57 +02:00
Christian Heimes e8e4283cec Remove redundant check for tb != NULL to shut up Coverity . It has been set to Py_None a couple of lines earlier.
CID 1291697 (#1 of 1): Dereference before null check (REVERSE_INULL)
check_after_deref: Null-checking tb suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
2015-04-16 17:25:45 +02:00
Steve Dower 8fc8980c96 Issue #23524: Replace _PyVerify_fd function with calls to _set_thread_local_invalid_parameter_handler. 2015-04-12 00:26:27 -04:00
Benjamin Peterson 55c14355ac fix building without threads (closes #23877) 2015-04-06 09:59:23 -04:00
Victor Stinner 13019fdef3 Issue #22117: Add a new _PyTime_FromSeconds() function
Fix also _Py_InitializeEx_Private(): initialize time before initializing
import, import_init() uses the _PyTime API (for thread locks).
2015-04-03 13:10:54 +02:00
Victor Stinner 53345a40bc (Merge 3.4) Issue #23571: Fix reentrant call to Py_FatalError()
Flushing sys.stdout and sys.stderr in Py_FatalError() can call again
Py_FatalError(). Add a reentrant flag to detect this case and just abort at the
second call.
2015-03-25 01:55:14 +01:00
Victor Stinner e0deff31d3 (Merge 3.4) Issue #23571: Py_FatalError() now tries to flush sys.stdout and
sys.stderr

It should help to see exceptions when stderr if buffered: PyErr_Display() calls
sys.stderr.write(), it doesn't write into stderr file descriptor directly.
2015-03-24 13:46:18 +01:00
Victor Stinner 10dc48497e (Merge 3.4) Issue #23571: Enhance Py_FatalError()
* Display the current Python stack if an exception was raised but the exception
  has no traceback
* Disable faulthandler if an exception was raised (before it was only disabled
  if no exception was raised)
* To display the current Python stack, call PyGILState_GetThisThreadState()
  which works even if the GIL was released
2015-03-24 12:01:30 +01:00
Serhiy Storchaka 53fa8b2a4b Fixed few compiler warnings. 2015-02-16 09:40:12 +02:00
Zachary Ware c4821d62b4 Closes #22869: Move PyOS_CheckStack back to pythonrun.c 2014-11-21 23:35:12 -06:00
Nick Coghlan d600951748 Issue #22869: Split pythonrun into two modules
- interpreter startup and shutdown code moved to a new
  pylifecycle.c module
- Py_OptimizeFlag moved into the new module with the other
  global flags
2014-11-20 21:39:37 +10:00
Victor Stinner a2e5e044af Py_FatalError: disable faulthandler earlier
Issue #26563: Py_FatalError: disable faulthandler before trying to flush
sys.stdout and sys.stderr.
2016-03-16 23:19:15 +01:00
Victor Stinner 4ddee7f5fd Fix Py_FatalError() if called without the GIL
Issue #26558: If Py_FatalError() is called without the GIL, don't try to print
the current exception, nor try to flush stdout and stderr: only dump the
traceback of Python threads.
2016-03-14 16:53:12 +01:00