Sha256: 3bf30a44871a3574c8982d249ad78477846ae712cb4729afa3a3c5c9aa9eced7

Contents?: true

Size: 448 Bytes

Versions: 49

Compression:

Stored size: 448 Bytes

Contents

require 'ffi'

module Puma
  module JRubyRestart
    extend FFI::Library
    ffi_lib 'c'

    attach_function :execlp, [:string, :varargs], :int
    attach_function :chdir, [:string], :int

    def self.chdir_exec(dir, cmd, *argv)
      chdir(dir)
      argv.unshift(cmd)
      argv = ([:string] * argv.size).zip(argv).flatten
      argv <<:int
      argv << 0
      execlp(cmd, *argv)
      raise SystemCallError.new(FFI.errno)
    end
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
puma-0.9.5 lib/puma/jruby_restart.rb
puma-0.9.4-java lib/puma/jruby_restart.rb
puma-0.9.4 lib/puma/jruby_restart.rb
puma-0.9.3-java lib/puma/jruby_restart.rb
puma-0.9.3 lib/puma/jruby_restart.rb
puma-0.9.2-java lib/puma/jruby_restart.rb
puma-0.9.2 lib/puma/jruby_restart.rb
puma-0.9.1-java lib/puma/jruby_restart.rb
puma-0.9.1 lib/puma/jruby_restart.rb