From 41e6a4804fff41f88b121489aa0672c6fab9a1a2 Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Thu, 26 Feb 2015 18:49:39 -0800 Subject: Modify windows_service to use timeout --- lib/chef/application/windows_service.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chef/application/windows_service.rb b/lib/chef/application/windows_service.rb index ba7c6dab5a..05828424c4 100644 --- a/lib/chef/application/windows_service.rb +++ b/lib/chef/application/windows_service.rb @@ -189,7 +189,7 @@ class Chef config_params += " -c #{Chef::Config[:config_file]}" unless Chef::Config[:config_file].nil? config_params += " -L #{Chef::Config[:log_location]}" unless Chef::Config[:log_location] == STDOUT # Starts a new process and waits till the process exits - result = shell_out("chef-client #{config_params}") + result = shell_out("chef-client #{config_params}", :timeout => Chef::Config[:windows_service][:watchdog_timeout]) Chef::Log.debug "#{result.stdout}" Chef::Log.debug "#{result.stderr}" rescue Mixlib::ShellOut::ShellCommandFailed => e -- cgit v1.2.1