This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2013-01-10 22:25:18vstinnersetrecipients: + vstinner, christian.heimes, ezio.melotti, felipecruz, jcon, berker.peksag, serhiy.storchaka, mrshu
2013-01-10 22:25:18vstinnersetmessageid: <1357856718.75.0.166472675822.issue15948@psf.upfronthosting.co.za>
2013-01-10 22:25:18vstinnerlinkissue15948 messages
2013-01-10 22:25:18vstinnercreate