Skip to content

Fix FFMpegBase.isAvailable with detached terminals. #17882

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

Merged
merged 1 commit into from
Jul 12, 2020

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Jul 10, 2020

PR Summary

When checking for ffmpeg/libav, set stdin to /dev/null, otherwise the process will sleep if Python is running with a detached terminal. And we definitely don't want ffmpeg/libav to grab user input here.

I don't think there's any way to test this automatically, really, but if anyone has any ideas...

Fixes #17875.

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • [N/A] New features are documented, with examples if plot related
  • [N/A] Documentation is sphinx and numpydoc compliant
  • [N/A] Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • [N/A] Documented in doc/api/next_api_changes/* if API changed in a backward-incompatible way

When checking for ffmpeg/libav, set stdin to /dev/null, otherwise the
process will sleep if Python is running with a detached terminal. And we
definitely don't want ffmpeg/libav to grab user input here.
@QuLogic QuLogic added this to the v3.3.0 milestone Jul 10, 2020
Copy link
Contributor

@dopplershift dopplershift left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Tested and this fixes the issue on my system.

@dstansby dstansby merged commit 156dfa4 into matplotlib:master Jul 12, 2020
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Jul 12, 2020
dstansby added a commit that referenced this pull request Jul 12, 2020
…882-on-v3.3.x

Backport PR #17882 on branch v3.3.x (Fix FFMpegBase.isAvailable with detached terminals.)
@QuLogic QuLogic deleted the fix-animation-init branch July 12, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

animation.writers['ffmpeg']" is hung when run in background.
3 participants