diff --git a/lib/fluent/command/fluentd.rb b/lib/fluent/command/fluentd.rb index d8707b7bcd..4cda843746 100644 --- a/lib/fluent/command/fluentd.rb +++ b/lib/fluent/command/fluentd.rb @@ -256,7 +256,7 @@ description: FLUENTD_WINSVC_DESC, start_type: start_type, error_control: Service::ERROR_NORMAL, - binary_path_name: ruby_path+" -C "+binary_path+" winsvc.rb", + binary_path_name: "\"#{ruby_path}\" -C \"#{binary_path}\" winsvc.rb", load_order_group: "", dependencies: [""], display_name: FLUENTD_WINSVC_DISPLAYNAME diff --git a/lib/fluent/winsvc.rb b/lib/fluent/winsvc.rb index 97eaf34f2f..ecb0ff9451 100644 --- a/lib/fluent/winsvc.rb +++ b/lib/fluent/winsvc.rb @@ -40,7 +40,7 @@ def service_main_start ruby_path = ruby_path.rstrip.gsub(/\\/, '/') rubybin_dir = ruby_path[0, ruby_path.rindex("/")] opt = read_fluentdopt - Process.spawn(rubybin_dir + "/ruby.exe " + rubybin_dir + "/fluentd " + opt + " -x " + INTEVENTOBJ_NAME) + Process.spawn("\"#{rubybin_dir}/ruby.exe\" \"#{rubybin_dir}/fluentd\" #{opt} -x #{INTEVENTOBJ_NAME}") end class FluentdService < Daemon