about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-12-09 23:52:26 -0800
committerEric Wong <normalperson@yhbt.net>2009-12-09 23:52:26 -0800
commita8ef8c7f1156e2624d3cc3a37a72ff82bbc6a159 (patch)
tree933694a5cefa5b268bb5b94cf2c69573bbf7cc15
parent71af3819c0b79ce09e2f8237aca22ce902510bdd (diff)
downloadzbatery-a8ef8c7f1156e2624d3cc3a37a72ff82bbc6a159.tar.gz
trap and noop SIGWINCH, too
-rw-r--r--lib/zbatery.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/zbatery.rb b/lib/zbatery.rb
index 0b9b553..6ed9134 100644
--- a/lib/zbatery.rb
+++ b/lib/zbatery.rb
@@ -75,8 +75,9 @@ module Zbatery
         trap(:HUP) { reexec; stop }
 
         # technically feasible in some cases, just not sanely supportable:
-        trap(:TTIN) { logger.info "SIGTTIN is not handled by Zbatery" }
-        trap(:TTOU) { logger.info "SIGTTOU is not handled by Zbatery" }
+        %w(TTIN TTOU WINCH).each do |sig|
+          trap(sig) { logger.info "SIG#{sig} is not handled by Zbatery" }
+        end
       rescue => e # hopefully ignores errors on Win32...
         logger.error "failed to setup signal handler: #{e.message}"
       end