STINNER Victor added the comment:
diff -r 0acc5626a578 Modules/faulthandler.c
@@ -445,7 +445,10 @@
- write(thread.fd, thread.header, thread.header_len);
+ if (write(thread.fd, thread.header, thread.header_len) == -1) {
+ PyErr_SetFromErrno(PyExc_IOError);
+ return;
+ }
I wrote faulthandler to debug deadlocks, memory corruptions and other cases
where Python internals are no consistency anymore.
faulthandler_thread() is not a Python thread, but a C thread. I don't know if
it's legal to call PyErr_SetFromErrno(). And it would be really surprising to
get a Python exception whereas it does not come from Python code.
I would prefer to just ignore if write() failed here.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15948>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com