From aa7ebc15283c684c8c69d743b061b0daef179638 Mon Sep 17 00:00:00 2001 From: Yannick Mauray Date: Thu, 28 Oct 2021 08:28:19 +0200 Subject: [PATCH] fix : kill all background processes when exiting (#165) --- quickget | 2 ++ 1 file changed, 2 insertions(+) diff --git a/quickget b/quickget index c6be8f4..c229c9f 100755 --- a/quickget +++ b/quickget @@ -23,6 +23,8 @@ # } # 6. Add new OS to the argument parser at the bottom of the script +trap 'kill $(jobs -p)' EXIT + if ((BASH_VERSINFO[0] < 4)) then echo "Sorry, you need bash 4.0 or newer to run this script."