diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-03-15 16:24:13 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-03-15 16:24:13 (GMT) |
commit | b380010782959bd2d483320ea237ed3b8dd3d4f7 (patch) | |
tree | 424eafd4e1be710e5d12af298dd57154b673adad /Modules | |
parent | 7105e9f3de801ce50e24fcdfbdd450858e28a0fd (diff) | |
parent | 57003f81ead9ff38150c1e4821811c66c296d33c (diff) | |
download | cpython-b380010782959bd2d483320ea237ed3b8dd3d4f7.zip cpython-b380010782959bd2d483320ea237ed3b8dd3d4f7.tar.gz cpython-b380010782959bd2d483320ea237ed3b8dd3d4f7.tar.bz2 |
Merge 3.5 (test_faulthandler)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/faulthandler.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Modules/faulthandler.c b/Modules/faulthandler.c index 14384b5..45c9fcb 100644 --- a/Modules/faulthandler.c +++ b/Modules/faulthandler.c @@ -935,10 +935,18 @@ static PyObject * faulthandler_fatal_error_py(PyObject *self, PyObject *args) { char *message; - if (!PyArg_ParseTuple(args, "y:fatal_error", &message)) + int release_gil = 0; + if (!PyArg_ParseTuple(args, "y|i:fatal_error", &message, &release_gil)) return NULL; faulthandler_suppress_crash_report(); - Py_FatalError(message); + if (release_gil) { + Py_BEGIN_ALLOW_THREADS + Py_FatalError(message); + Py_END_ALLOW_THREADS + } + else { + Py_FatalError(message); + } Py_RETURN_NONE; } |