Skip to content

Commit

Permalink
for Windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Jul 17, 2013
1 parent 81d6633 commit 4cd9afb
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/fluent/command/fluentd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
require 'fluent/env'
require 'fluent/version'

$fluentdargv = Marshal.load(Marshal.dump(ARGV))

This comment has been minimized.

Copy link
@repeatedly

repeatedly Jul 22, 2013

Member

Is this line needed?

This comment has been minimized.

Copy link
@repeatedly

repeatedly Jul 22, 2013

Member

Ah, I forgot previous commit. Hmm... we need more better solution.

This comment has been minimized.

Copy link
@okahashi117

okahashi117 Jul 29, 2013

Member

Yes, I think so.


op = OptionParser.new
op.version = Fluent::VERSION

Expand All @@ -36,6 +38,7 @@
:chuser => nil,
:chgroup => nil,
:suppress_interval => 0,
:usespawn => 0,
}

op.on('-s', "--setup [DIR=#{File.dirname(Fluent::DEFAULT_CONFIG_PATH)}]", "install sample configuration file to the directory") {|s|
Expand Down Expand Up @@ -98,6 +101,12 @@
end
}

op.on('-u', '--usespwan', "*** internal use only *** use spawn instead of fork (Windows only)", TrueClass) {|b|
if b
opts[:usespawn] = 1

This comment has been minimized.

Copy link
@repeatedly

repeatedly Jul 22, 2013

Member

Use true, not 1.
And if - end is not needed.

end
}

(class<<self;self;end).module_eval do
define_method(:usage) do |msg|
puts op.to_s
Expand Down

0 comments on commit 4cd9afb

Please sign in to comment.