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-1.5.0 lib/puma/jruby_restart.rb
puma-1.4.0-java lib/puma/jruby_restart.rb
puma-1.4.0 lib/puma/jruby_restart.rb
puma-1.3.1-java lib/puma/jruby_restart.rb
puma-1.3.1 lib/puma/jruby_restart.rb
puma-1.3.0-java lib/puma/jruby_restart.rb
puma-1.3.0 lib/puma/jruby_restart.rb
puma-1.2.2-java lib/puma/jruby_restart.rb
puma-1.2.2 lib/puma/jruby_restart.rb
puma-1.2.1-java lib/puma/jruby_restart.rb
puma-1.2.1 lib/puma/jruby_restart.rb
puma-1.2.0-java lib/puma/jruby_restart.rb
puma-1.2.0 lib/puma/jruby_restart.rb
puma-1.1.1-java lib/puma/jruby_restart.rb
puma-1.1.1 lib/puma/jruby_restart.rb
puma-1.1.0-java lib/puma/jruby_restart.rb
puma-1.1.0 lib/puma/jruby_restart.rb
puma-1.0.0-java lib/puma/jruby_restart.rb
puma-1.0.0 lib/puma/jruby_restart.rb
puma-0.9.5-java lib/puma/jruby_restart.rb