aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-10-22 13:10:27 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-10-22 13:10:27 +0800
commite034cbc581c79b14c6337adf51bf4a99f726302d (patch)
treee766cf2817c4a5fed4002fe674a7c08acce9b925 /youtube_dl
parent69c2d42bd730b4ea07fe5ba9015049423b71c8a9 (diff)
parent5378f8ce0d59d0a948d2597b175b2b1cff3e8bb2 (diff)
downloadyoutube-dl-e034cbc581c79b14c6337adf51bf4a99f726302d.tar.xz
Merge branch 'johnhawkinson-stdin2'
Diffstat (limited to 'youtube_dl')
-rw-r--r--youtube_dl/utils.py4
1 files changed, 4 insertions, 0 deletions
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