# File lib/chef/application.rb, line 34 def initialize super @chef_client = nil @chef_client_json = nil trap("TERM") do Chef::Application.fatal!("SIGTERM received, stopping", 1) end trap("INT") do Chef::Application.fatal!("SIGINT received, stopping", 2) end unless Chef::Platform.windows? 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 # Always switch to a readable directory. Keeps subsequent Dir.chdir() {} # from failing due to permissions when launched as a less privileged user. end