summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNuo Yan <nuo@opscode.com>2010-04-28 11:10:03 -0700
committerDaniel DeLeo <dan@opscode.com>2010-05-04 14:02:01 -0700
commit0cdea3eb208d28955fc80abb44795ebb9d5e26f1 (patch)
treec9094eaac465bde1a172d10d28ea5adc7c61bd46
parent0709eba188b8cbadf15599b012462148e1a3f959 (diff)
downloadchef-0cdea3eb208d28955fc80abb44795ebb9d5e26f1.tar.gz
trap HUP signal only if not on Windows
-rw-r--r--chef/lib/chef/application.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/chef/lib/chef/application.rb b/chef/lib/chef/application.rb
index 0670b9a661..db4cbe0df7 100644
--- a/chef/lib/chef/application.rb
+++ b/chef/lib/chef/application.rb
@@ -34,9 +34,11 @@ class Chef::Application
Chef::Application.fatal!("SIGINT received, stopping", 2)
end
- trap("HUP") do
- Chef::Log.info("SIGHUP received, reconfiguring")
- reconfigure
+ unless RUBY_PLATFORM =~ /mswin|mingw32/
+ trap("HUP") do
+ Chef::Log.info("SIGHUP received, reconfiguring")
+ reconfigure
+ end
end
at_exit do