lib/pitchfork.rb in pitchfork-0.13.0 vs lib/pitchfork.rb in pitchfork-0.14.0

- old
+ new

@@ -1,10 +1,9 @@ # -*- encoding: binary -*- # frozen_string_literal: true require 'etc' require 'stringio' -require 'raindrops' require 'io/wait' begin require 'rack' rescue LoadError @@ -116,28 +115,9 @@ def log_error(logger, prefix, exc) message = exc.message message = message.dump if /[[:cntrl:]]/ =~ message logger.error "#{prefix}: #{message} (#{exc.class})" exc.backtrace.each { |line| logger.error(line) } - end - - F_SETPIPE_SZ = 1031 if RUBY_PLATFORM =~ /linux/ - - def pipe # :nodoc: - IO.pipe.each do |io| - # shrink pipes to minimize impact on /proc/sys/fs/pipe-user-pages-soft - # limits. - if defined?(F_SETPIPE_SZ) - begin - io.fcntl(F_SETPIPE_SZ, Raindrops::PAGE_SIZE) - rescue Errno::EINVAL - # old kernel - rescue Errno::EPERM - # resizes fail if Linux is close to the pipe limit for the user - # or if the user does not have permissions to resize - end - end - end end def socketpair pair = UNIXSocket.socketpair(@socket_type).map { |s| MessageSocket.new(s) } pair[0].close_write