Module: RightScale::SubprocessFormatting

Defined in:
lib/right_agent/subprocess.rb

Constant Summary collapse

SIGNAL_LOOKUP =
Signal.list.invert

Class Method Summary collapse

Class Method Details

.reason(status) ⇒ Object



30
31
32
33
34
35
36
# File 'lib/right_agent/subprocess.rb', line 30

def reason(status)
  if status.exitstatus.nil?
    "terminated with SIG#{SIGNAL_LOOKUP[status.termsig]}"
  else
    "exited with #{status.exitstatus}"
  end
end