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:
parent
d9eebbc747
commit
f5b1bca913
8 changed files with 41 additions and 20 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue