mirror of
https://github.com/elastic/logstash.git
synced 2025-04-22 21:57:26 -04:00
Work done by @guyboertje and @ph Since JRuby 1.7.25 is now EOL we are migrating Logstash to use JRuby 9k and JDK8 only, Not much needed updating to make this work, its was mostly a drop in replacement from the previous version. The major point was the change in the implementation of Time in JRuby, JRuby now use `java.time` instead of joda time, this allow JRuby to have nanoseconds precision on time object.
20 lines
537 B
Ruby
20 lines
537 B
Ruby
# This is a patch for childprocess and this is due to ruby-cabin/fpm interaction.
|
|
# When we use the logger.pipe construct and the IO reach EOF we close the IO.
|
|
# The problem Childprocess will try to flush to it and hit an IOError making the software crash in JRuby 9k.
|
|
#
|
|
# In JRuby 1.7.25 we hit a thread death.
|
|
#
|
|
module ChildProcess
|
|
module JRuby
|
|
class Pump
|
|
alias_method :old_pump, :pump
|
|
|
|
def ignore_close_io
|
|
old_pump
|
|
rescue IOError
|
|
end
|
|
|
|
alias_method :pump, :ignore_close_io
|
|
end
|
|
end
|
|
end
|