diff options
author | pukkandan <pukkandan@gmail.com> | 2021-01-09 17:56:12 +0530 |
---|---|---|
committer | pukkandan <pukkandan@gmail.com> | 2021-01-09 18:08:07 +0530 |
commit | f5b1bca9139fcbac76dca3a6b17e69f53a885988 (patch) | |
tree | 2426a3eef3733d998bdcd0ac3d56a42f155ce7d7 /youtube_dlc/extractor/openload.py | |
parent | d9eebbc7471b97f3aa58939685bd7b8f4ce35b1e (diff) |
Kill child processes when yt-dlc is killed (https://github.com/ytdl-org/youtube-dl/pull/26592)
Authored by: Unrud
Diffstat (limited to 'youtube_dlc/extractor/openload.py')
-rw-r--r-- | youtube_dlc/extractor/openload.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dlc/extractor/openload.py b/youtube_dlc/extractor/openload.py index 0c20d0177..dfdd0e526 100644 --- a/youtube_dlc/extractor/openload.py +++ b/youtube_dlc/extractor/openload.py @@ -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)) |