mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Run exec properly to restart. Fixes #154
This commit is contained in:
parent
86b9bf5a17
commit
7c6d72b578
2 changed files with 5 additions and 5 deletions
|
@ -115,7 +115,7 @@ module Puma
|
|||
end
|
||||
|
||||
require 'puma/jruby_restart'
|
||||
JRubyRestart.chdir_exec(@restart_dir, Gem.ruby, *@restart_argv)
|
||||
JRubyRestart.chdir_exec(@restart_dir, @restart_argv)
|
||||
else
|
||||
redirects = {}
|
||||
@binder.listeners.each_with_index do |(l,io),i|
|
||||
|
|
|
@ -8,12 +8,12 @@ module Puma
|
|||
attach_function :execlp, [:string, :varargs], :int
|
||||
attach_function :chdir, [:string], :int
|
||||
|
||||
def self.chdir_exec(dir, cmd, *argv)
|
||||
def self.chdir_exec(dir, argv)
|
||||
chdir(dir)
|
||||
argv.unshift(cmd)
|
||||
cmd = argv.first
|
||||
argv = ([:string] * argv.size).zip(argv).flatten
|
||||
argv <<:int
|
||||
argv << 0
|
||||
argv << :string
|
||||
argv << nil
|
||||
execlp(cmd, *argv)
|
||||
raise SystemCallError.new(FFI.errno)
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue