Module: Process::StatusExtensions
- Included in:
- Status
- Defined in:
- lib/polyphony/extensions/process.rb
Instance Method Summary collapse
- #coredump? ⇒ Boolean
- #exited? ⇒ Boolean
- #exitstatus ⇒ Object
- #inspect ⇒ Object
- #pid ⇒ Object
- #signaled? ⇒ Boolean
- #stopped? ⇒ Boolean
- #stopsig ⇒ Object
- #success? ⇒ Boolean
- #termsig ⇒ Object
Instance Method Details
#coredump? ⇒ Boolean
6 7 8 |
# File 'lib/polyphony/extensions/process.rb', line 6 def coredump? @status ? nil : super end |
#exited? ⇒ Boolean
10 11 12 |
# File 'lib/polyphony/extensions/process.rb', line 10 def exited? @status ? WIFEXITED(@status[1]) : super end |
#exitstatus ⇒ Object
14 15 16 |
# File 'lib/polyphony/extensions/process.rb', line 14 def exitstatus @status ? WEXITSTATUS(@status[1]) : super end |
#inspect ⇒ Object
18 19 20 |
# File 'lib/polyphony/extensions/process.rb', line 18 def inspect @status ? "#<Process::Status: pid #{@status[0]} exit #{@status[1]}>" : super end |
#pid ⇒ Object
22 23 24 |
# File 'lib/polyphony/extensions/process.rb', line 22 def pid @status ? @status[0] : super end |
#signaled? ⇒ Boolean
26 27 28 |
# File 'lib/polyphony/extensions/process.rb', line 26 def signaled? @status ? WIFSIGNALED(@status[1]) : super end |
#stopped? ⇒ Boolean
30 31 32 |
# File 'lib/polyphony/extensions/process.rb', line 30 def stopped? @status ? WIFSTOPPED(@status[1]) : super end |
#stopsig ⇒ Object
34 35 36 |
# File 'lib/polyphony/extensions/process.rb', line 34 def stopsig @status ? WIFSTOPPED(@status[1]) && WEXITSTATUS(@status[1]) : super end |
#success? ⇒ Boolean
38 39 40 |
# File 'lib/polyphony/extensions/process.rb', line 38 def success? @status ? @status[1] == 0 : super end |
#termsig ⇒ Object
42 43 44 |
# File 'lib/polyphony/extensions/process.rb', line 42 def termsig @status ? WIFSIGNALED(@status[1]) && WTERMSIG(@status[1]) : super end |