Method: Foreman::Engine#notice_signal

Defined in:
lib/foreman/engine.rb

#notice_signalObject

Wake the main thread up via the selfpipe when there’s a signal



85
86
87
88
89
90
91
92
# File 'lib/foreman/engine.rb', line 85

def notice_signal
  @selfpipe[:writer].write_nonblock( '.' )
rescue Errno::EAGAIN
  # Ignore writes that would block
rescue Errno::EINTR
  # Retry if another signal arrived while writing
  retry
end