summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-07-22 19:38:52 +0100
committerLars Wirzenius <liw@liw.fi>2011-07-22 19:38:52 +0100
commit2a5867e8d1d2c5b500f667456946102c4273ce01 (patch)
tree817ac4cf0577457eeffa2b42dd8c0acb16e71d38
parent1b0c02eaade9dbf703c98921d5ee63047f2aa0c2 (diff)
downloadpython-ttystatus-2a5867e8d1d2c5b500f667456946102c4273ce01.tar.gz
Make SIGWINCH be a re-starting signal.
This makes obnam/paramiko not crap out if SIGWINCH arrives during its I/O.
-rw-r--r--ttystatus/messager.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/ttystatus/messager.py b/ttystatus/messager.py
index 53ab1c8..bcbceca 100644
--- a/ttystatus/messager.py
+++ b/ttystatus/messager.py
@@ -41,6 +41,7 @@ class Messager(object):
self._cached_msg = '' # Last message from user, to write() method.
self.set_width(self._get_terminal_width()) # Width of terminal
signal.signal(signal.SIGWINCH, self._sigwinch_handler)
+ signal.siginterrupt(signal.SIGWINCH, False)
def _open_tty(self): # pragma: no cover
return open('/dev/tty', 'w')