mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2025-08-14 02:27:42 -07:00
[utils, etc] Kill child processes when yt-dl is killed
* derived from PR #26592, closes #26592 Authored by: Unrud
This commit is contained in:
parent
811c480f7b
commit
0700fde640
8 changed files with 42 additions and 21 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue