This is a workaround for a strange hang on fork() when Popen is called with
a preexec_fn (see #58). If the environment variable
IMAGEIO_FFMPEG_NO_PREVENT_SIGINT is not empty, preexec_fn is set to
None.
It would be nice if "0" and "false" also resolve to Falsy. See e.g. this discussion. A quick version could be something like os.getenv(...).lower() not in ("", "0", "false").
Would you mind adding a section before the API section in the README that lists the environment variables? This one and IMAGEIO_FFMPEG_EXE. Otherwise I can do that after merging this PR.
Could you run black . on the code to fix formatting? :)
This is a workaround for a strange hang on fork() when
Popen
is called with apreexec_fn
(see #58). If the environment variableIMAGEIO_FFMPEG_NO_PREVENT_SIGINT
is not empty,preexec_fn
is set to None.