Skip to content

Commit

Permalink
Merge branch 'johnhawkinson-stdin2'
Browse files Browse the repository at this point in the history
  • Loading branch information
Yen Chi Hsuan committed Oct 22, 2016
2 parents 69c2d42 + 5378f8c commit e034cbc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
version <unreleased>

Core
* Running youtube-dl in the background is fixed (#10996, #10706, #955)


version 2016.10.21.1

Extractors
Expand Down
4 changes: 4 additions & 0 deletions youtube_dl/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e034cbc

Please sign in to comment.