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:
@@ -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))
|
||||
|
Reference in New Issue
Block a user