diff options
-rw-r--r-- | lib/chef/application.rb | 5 | ||||
-rw-r--r-- | lib/chef/application/client.rb | 6 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/chef/application.rb b/lib/chef/application.rb index 096ce9c392..41c1111f37 100644 --- a/lib/chef/application.rb +++ b/lib/chef/application.rb @@ -72,11 +72,6 @@ class Chef trap("QUIT") do Chef::Log.info("SIGQUIT received, call stack:\n " + caller.join("\n ")) end - - trap("HUP") do - Chef::Log.info("SIGHUP received, reconfiguring") - reconfigure - end end end diff --git a/lib/chef/application/client.rb b/lib/chef/application/client.rb index 3765821993..8926077117 100644 --- a/lib/chef/application/client.rb +++ b/lib/chef/application/client.rb @@ -412,6 +412,11 @@ class Chef::Application::Client < Chef::Application Chef::Log.info("SIGUSR1 received, waking up") SELF_PIPE[1].putc(IMMEDIATE_RUN_SIGNAL) # wakeup master process from select end + + trap("HUP") do + Chef::Log.info("SIGHUP received, reconfiguring") + $reconfigure = true + end end end @@ -438,6 +443,7 @@ class Chef::Application::Client < Chef::Application private def interval_run_chef_client + reconfigure if $reconfigure if Chef::Config[:daemonize] Chef::Daemon.daemonize("chef-client") |