Message179603
| Author |
vstinner |
| Recipients |
berker.peksag, christian.heimes, ezio.melotti, felipecruz, jcon, mrshu, serhiy.storchaka, vstinner |
| Date |
2013年01月10日.22:25:18 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1357856718.75.0.166472675822.issue15948@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|