changeset 11416:caf10970950e

ui: ignore EIO in write_err Hgs signal handler will catch the signal for example if the terminal hg is running in is closed. That will make it try to warn that it was 'killed', but that might fail with EIO and cause hg to exit with an unhandled exception. Normally nobody cares, but system error handlers such as Fedoras abrt will notice and report https://bugzilla.redhat.com/show_bug.cgi?id=596594 .
author Mads Kiilerich <mads@kiilerich.com>
date Wed, 16 Jun 2010 00:22:10 +0200
parents a1e575b48563
children 6f1d1ed3e19a
files mercurial/ui.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Jun 16 22:54:58 2010 +0200
+++ b/mercurial/ui.py	Wed Jun 16 00:22:10 2010 +0200
@@ -369,7 +369,7 @@
             if not getattr(sys.stderr, 'closed', False):
                 sys.stderr.flush()
         except IOError, inst:
-            if inst.errno != errno.EPIPE:
+            if inst.errno not in (errno.EPIPE, errno.EIO):
                 raise
 
     def flush(self):