From 2a5867e8d1d2c5b500f667456946102c4273ce01 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 22 Jul 2011 19:38:52 +0100 Subject: Make SIGWINCH be a re-starting signal. This makes obnam/paramiko not crap out if SIGWINCH arrives during its I/O. --- ttystatus/messager.py | 1 + 1 file changed, 1 insertion(+) 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') -- cgit v1.2.1