diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-12-09 23:52:26 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-12-09 23:52:26 -0800 |
commit | a8ef8c7f1156e2624d3cc3a37a72ff82bbc6a159 (patch) | |
tree | 933694a5cefa5b268bb5b94cf2c69573bbf7cc15 /lib/zbatery.rb | |
parent | 71af3819c0b79ce09e2f8237aca22ce902510bdd (diff) | |
download | zbatery-a8ef8c7f1156e2624d3cc3a37a72ff82bbc6a159.tar.gz |
trap and noop SIGWINCH, too
Diffstat (limited to 'lib/zbatery.rb')
-rw-r--r-- | lib/zbatery.rb | 5 |
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 |