summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPierre Ynard <p.ynard@criteo.com>2014-03-27 14:42:52 +0100
committerBryan McLellan <btm@getchef.com>2014-04-10 05:01:05 -0700
commitb3506a79fea58ed1c60ff7fe7080438f916d1ad7 (patch)
tree69afdfb421c9a82862350a46a6c1c25be05a07bd /lib
parent0e618d85e112ddb16729077982670492d4d9d1a8 (diff)
downloadchef-b3506a79fea58ed1c60ff7fe7080438f916d1ad7.tar.gz
[CHEF-5150] chef-service-manager: don't create interactive service
See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683502%28v=vs.85%29.aspx Default value in win32-service is interactive and there is no reason why chef-client should run as that.
Diffstat (limited to 'lib')
-rw-r--r--lib/chef/application/windows_service_manager.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/chef/application/windows_service_manager.rb b/lib/chef/application/windows_service_manager.rb
index 493f0dfc62..30810c51f2 100644
--- a/lib/chef/application/windows_service_manager.rb
+++ b/lib/chef/application/windows_service_manager.rb
@@ -112,6 +112,9 @@ class Chef
:service_name => @service_name,
:display_name => @service_display_name,
:description => @service_description,
+ # Prior to 0.8.5, win32-service creates interactive services by default,
+ # and we don't want that, so we need to override the service type.
+ :service_type => ::Win32::Service::SERVICE_WIN32_OWN_PROCESS,
:start_type => ::Win32::Service::SERVICE_AUTO_START,
:binary_path_name => cmd
)