1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-09-04 00:55:15 +00: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:
pukkandan
2021-01-09 17:56:12 +05:30
parent d9eebbc747
commit f5b1bca913
8 changed files with 41 additions and 20 deletions

View File

@ -89,11 +89,13 @@ class RtmpFD(FileDownloader):
self.to_screen('')
cursor_in_new_line = True
self.to_screen('[rtmpdump] ' + line)
finally:
if not cursor_in_new_line:
self.to_screen('')
return proc.wait()
except BaseException: # Including KeyboardInterrupt
proc.kill()
proc.wait()
if not cursor_in_new_line:
self.to_screen('')
return proc.returncode
raise
url = info_dict['url']
player_url = info_dict.get('player_url')