X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=2770c5f1c5ee55ea4708ce8cbfc3a0e249a2b23d;hb=7e7a028aa4108f5ce455fda88dfdcee13b3b7578;hp=28941673fa9bec36b24464faa79cc3b2348aca99;hpb=9218a6b4f5292cc3d7761484e6b5dbe1e7a1a998;p=youtube-dl diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 28941673f..2770c5f1c 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -1818,8 +1818,12 @@ def get_exe_version(exe, args=['--version'], """ Returns the version of the specified executable, or False if the executable is not present """ try: + # STDIN should be redirected too. On UNIX-like systems, ffmpeg triggers + # SIGTTOU if youtube-dl is run in the background. + # See https://github.com/rg3/youtube-dl/issues/955#issuecomment-209789656 out, _ = subprocess.Popen( [encodeArgument(exe)] + args, + stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate() except OSError: return False