1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-04 12:55:25 -04:00

Kill child processes when yt-dlc is killed (https://github.com/ytdl-org/youtube-dl/pull/26592)

Authored by: Unrud
This commit is contained in:
pukkandan
2021-01-09 17:56:12 +05:30
parent d9eebbc747
commit f5b1bca913
8 changed files with 41 additions and 20 deletions

View File

@@ -17,6 +17,7 @@ from ..utils import (
get_exe_version,
is_outdated_version,
std_headers,
process_communicate_or_kill,
)
@@ -226,7 +227,7 @@ class PhantomJSwrapper(object):
self.exe, '--ssl-protocol=any',
self._TMP_FILES['script'].name
], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
out, err = p.communicate()
out, err = process_communicate_or_kill(p)
if p.returncode != 0:
raise ExtractorError(
'Executing JS failed\n:' + encodeArgument(err))