From 609f56fb7a0f6a8397b06ecb1755ef3f841b88f0 Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Wed, 25 May 2016 13:58:57 +0200 Subject: [PATCH] fix(wrapper.sh): Silence output of failed kills --- scripts/lemonbuddy_wrapper.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/lemonbuddy_wrapper.sh b/scripts/lemonbuddy_wrapper.sh index 291ebb90..7bff0f58 100755 --- a/scripts/lemonbuddy_wrapper.sh +++ b/scripts/lemonbuddy_wrapper.sh @@ -30,12 +30,12 @@ cleanup_proc() { pid=$1 kill -0 "$pid" 2>/dev/null && { echo "$pid is running (sending term signal)..." - kill -TERM "$pid" + kill -TERM "$pid" 2>/dev/null } } # shellcheck disable=SC2094 -{ lemonbuddy "$@" -p "$pipe" 2>"$logfile"; kill -TERM $$; } | $lemonbar >"$pipe" & +{ lemonbuddy "$@" -p "$pipe" 2>"$logfile"; kill -TERM $$ 2>/dev/null; } | $lemonbar >"$pipe" & trap 'cleanup_proc $!' TERM INT