From fa5e48e323ec34e10674f7419287470e35dbfff1 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 2 Jun 2009 17:41:11 +0000 Subject: added a signal handler for terminal resize git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@781091 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/python/qpid-python-test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'qpid/python/qpid-python-test') diff --git a/qpid/python/qpid-python-test b/qpid/python/qpid-python-test index d02f2ac6cc..8d56311dbe 100755 --- a/qpid/python/qpid-python-test +++ b/qpid/python/qpid-python-test @@ -110,6 +110,13 @@ def width(): WIDTH = width() +def resize(sig, frm): + global WIDTH + WIDTH = width() + +import signal +signal.signal(signal.SIGWINCH, resize) + def vt100_attrs(*attrs): return "\x1B[%sm" % ";".join(map(str, attrs)) -- cgit v1.2.1