module Spring::Client::RunImpl
Constants
- FORWARDED_SIGNALS
- TIMEOUT
Public Instance Methods
forward_signal(sig, pid)
click to toggle source
# File lib/spring-jruby/impl/fork/run.rb, line 37 def forward_signal(sig, pid) kill(sig, pid) rescue Errno::ESRCH # If the application process is gone, then don't block the # signal on this process. trap(sig, 'DEFAULT') Process.kill(sig, Process.pid) end
forward_signals(pid)
click to toggle source
# File lib/spring-jruby/impl/fork/run.rb, line 28 def forward_signals(pid) @signal_queue.each { |sig| kill sig, pid } RunImpl::FORWARDED_SIGNALS.each do |sig| trap(sig) { forward_signal sig, pid } end rescue Errno::ESRCH end
queue_signals()
click to toggle source
# File lib/spring-jruby/impl/fork/run.rb, line 7 def queue_signals RunImpl::FORWARDED_SIGNALS.each do |sig| trap(sig) { @signal_queue << sig } end end
run_on(application, pid)
click to toggle source
# File lib/spring-jruby/impl/fork/run.rb, line 19 def run_on(application, pid) forward_signals(pid.to_i) status = application.read.to_i log "got exit status #{status}" exit status end
send_std_io_to(application)
click to toggle source
# File lib/spring-jruby/impl/fork/run.rb, line 13 def send_std_io_to(application) application.send_io STDOUT application.send_io STDERR application.send_io STDIN end