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-2.0.0.b6 lib/puma/jruby_restart.rb
puma-2.0.0.b5 lib/puma/jruby_restart.rb
puma-2.0.0.b4-java lib/puma/jruby_restart.rb
puma-2.0.0.b4 lib/puma/jruby_restart.rb
puma-2.0.0.b3-java lib/puma/jruby_restart.rb
puma-2.0.0.b3 lib/puma/jruby_restart.rb
puma-2.0.0.b2-java lib/puma/jruby_restart.rb
puma-2.0.0.b2 lib/puma/jruby_restart.rb
fragrant-0.0.5 vendor/bundle/ruby/1.9.1/gems/puma-1.6.3/lib/puma/jruby_restart.rb
puma-2.0.0.b1-java lib/puma/jruby_restart.rb
puma-2.0.0.b1 lib/puma/jruby_restart.rb
puma-1.6.3-java lib/puma/jruby_restart.rb
puma-1.6.3 lib/puma/jruby_restart.rb
puma-1.6.2-java lib/puma/jruby_restart.rb
puma-1.6.2 lib/puma/jruby_restart.rb
puma-1.6.1-java lib/puma/jruby_restart.rb
puma-1.6.1 lib/puma/jruby_restart.rb
puma-1.6.0-java lib/puma/jruby_restart.rb
puma-1.6.0 lib/puma/jruby_restart.rb
puma-1.5.0-java lib/puma/jruby_restart.rb