lib/screen-recorder/common.rb
#
# Waits for given process to exit.
# Forcefully kills the process if it does not exit within 5 seconds.
# Returns exit code.
#
Waits for given process to exit.
Forcefully kills the process if it does not exit within 5 seconds.
Returns exit code.
Waits for given process to exit . Forcefully kills the process if it does not exit within 5 seconds . Returns exit code .
def wait_for_process_exit(process)
      process.poll_for_exit(PROCESS_TIMEOUT)
      process.exit_code 
    rescue ChildProcess::TimeoutError
      ScreenRecorder.logger.error 'ffmpeg failed to stop. Force killing it...'
      process.stop 
      ScreenRecorder.logger.error 'Forcefully killed ffmpeg. Recording failed!'
      1
    end
def wait_for_process_exit ( process ) process . poll_for_exit ( PROCESS_TIMEOUT ) process . exit_code rescue ChildProcess :: TimeoutError ScreenRecorder . logger . error 'ffmpeg failed to stop. Force killing it...' process . stop ScreenRecorder . logger . error 'Forcefully killed ffmpeg. Recording failed!' 1 end
Waits for given process to exit.
Waits for given process to exit .
# 0 # Tries increasingly harsher methods to kill the process.
process
<not_specific>