diff options
author | nimisha <nimisha.sharad@msystechnologies.com> | 2017-05-04 16:20:14 +0530 |
---|---|---|
committer | Bryan McLellan <btm@loftninjas.org> | 2017-05-31 14:20:20 -0500 |
commit | 8a1539d0c29426383df0e7e548dfdb38204720d7 (patch) | |
tree | 43cea3ca423b53baa3e2ba953843ffbd0a667977 /lib/chef/application | |
parent | 734774fcbb012533f99c9aa67ca1e6b54f922137 (diff) | |
download | chef-8a1539d0c29426383df0e7e548dfdb38204720d7.tar.gz |
Calling reconfigure outside trap('HUP')
Signed-off-by: nimisha <nimisha.sharad@msystechnologies.com>
Diffstat (limited to 'lib/chef/application')
-rw-r--r-- | lib/chef/application/client.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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") |