Catch systemexit from kibana

This commit is contained in:
Jordan Sissel 2013-08-28 06:39:24 -07:00
parent 759414cd67
commit aef6671a81

View file

@ -80,7 +80,13 @@ module LogStash::Kibana
#end #end
end end
args = opts.parse(args) begin
args = opts.parse(args)
rescue SystemExit
# if you ask for --help, optparse will exit.
# capture it and return normally
return []
end
@thread = Thread.new do @thread = Thread.new do
Cabin::Channel.get.info("Starting web server", :settings => settings) Cabin::Channel.get.info("Starting web server", :settings => settings)
@ -94,7 +100,7 @@ module LogStash::Kibana
public public
def wait def wait
@thread.join @thread.join if @thread
return 0 return 0
end # def wait end # def wait
end end