Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force kill ffmpeg process when Timeout::Error occurs in #stop_ffmpeg. #60

Closed
kapoorlakshya opened this issue Apr 11, 2019 · 0 comments · Fixed by #63
Closed

Force kill ffmpeg process when Timeout::Error occurs in #stop_ffmpeg. #60

kapoorlakshya opened this issue Apr 11, 2019 · 0 comments · Fixed by #63
Labels
enhancement New feature or request
Milestone

Comments

@kapoorlakshya
Copy link
Owner

kapoorlakshya commented Apr 11, 2019

Will need OS specific logic. This one works on macOS and possibly on Linux:

def stop_ffmpeg
# ...
rescue Timeout::Error
  ScreenRecorder.logger.error 'FFmpeg failed to stop. Force killing it...'
  pid = (@process.pid + 1) # Parent process + 1
  Process.kill 'TERM', pid
end

Could combine with #18.

@kapoorlakshya kapoorlakshya added the bug Something isn't working label Apr 11, 2019
@kapoorlakshya kapoorlakshya added this to the v1.1.0 milestone Apr 11, 2019
@kapoorlakshya kapoorlakshya added enhancement New feature or request and removed bug Something isn't working labels Apr 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant