mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
bpo-39882: Add _Py_FatalErrorFormat() function (GH-19157)
This commit is contained in:
parent
ace018ca47
commit
87d3b9db4a
15 changed files with 158 additions and 110 deletions
|
|
@ -292,12 +292,11 @@ _enter_buffered_busy(buffered *self)
|
|||
}
|
||||
Py_END_ALLOW_THREADS
|
||||
if (relax_locking && st != PY_LOCK_ACQUIRED) {
|
||||
PyObject *msgobj = PyUnicode_FromFormat(
|
||||
"could not acquire lock for %A at interpreter "
|
||||
PyObject *ascii = PyObject_ASCII((PyObject*)self);
|
||||
_Py_FatalErrorFormat(__func__,
|
||||
"could not acquire lock for %s at interpreter "
|
||||
"shutdown, possibly due to daemon threads",
|
||||
(PyObject *) self);
|
||||
const char *msg = PyUnicode_AsUTF8(msgobj);
|
||||
Py_FatalError(msg);
|
||||
ascii ? PyUnicode_AsUTF8(ascii) : "<ascii(self) failed>");
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue