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