diff options
author | pukkandan <pukkandan@gmail.com> | 2021-01-09 17:56:12 +0530 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2022-06-10 19:57:46 +0100 |
commit | 0700fde6403aa9eec1ff02bff7323696a205900c (patch) | |
tree | f1ed405d2af1934a06ff2091420172a0cc98f23a /youtube_dl/postprocessor/embedthumbnail.py | |
parent | 811c480f7b6c25ca510a033e6365d00174135392 (diff) |
[utils, etc] Kill child processes when yt-dl is killed
* derived from PR #26592, closes #26592
Authored by: Unrud
Diffstat (limited to 'youtube_dl/postprocessor/embedthumbnail.py')
-rw-r--r-- | youtube_dl/postprocessor/embedthumbnail.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/youtube_dl/postprocessor/embedthumbnail.py b/youtube_dl/postprocessor/embedthumbnail.py index 3990908b6..5e7b6e2df 100644 --- a/youtube_dl/postprocessor/embedthumbnail.py +++ b/youtube_dl/postprocessor/embedthumbnail.py @@ -13,8 +13,9 @@ from ..utils import ( encodeFilename, PostProcessingError, prepend_extension, + process_communicate_or_kill, replace_extension, - shell_quote + shell_quote, ) @@ -109,7 +110,7 @@ class EmbedThumbnailPP(FFmpegPostProcessor): self._downloader.to_screen('[debug] AtomicParsley command line: %s' % shell_quote(cmd)) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate() + stdout, stderr = process_communicate_or_kill(p) if p.returncode != 0: msg = stderr.decode('utf-8', 'replace').strip() |