From 46328eb05aef3a07c48ea0ec094bb887ed2c6e46 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 10 Sep 2015 16:32:35 +0200 Subject: Send SIGINT to scripts on Ctrl-C --- radio.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radio.sh b/radio.sh index b6eb305..31a5ac1 100755 --- a/radio.sh +++ b/radio.sh @@ -16,9 +16,10 @@ printmsg() { script_pid=0 sigint_trap() { - printerr "Got Ctrl-C, killing radio encoder script" + printerr "Got Ctrl-C" if [[ "$script_pid" != "0" ]] ; then - kill $script_pid + printmsg "killing radio encoder script $script_pid" + kill -INT $script_pid script_pid=0 wait fi -- cgit v1.2.3