fix(wrapper.sh): Silence output of failed kills

This commit is contained in:
Michael Carlberg 2016-05-25 13:58:57 +02:00
parent 6c6919550b
commit 609f56fb7a

View File

@ -30,12 +30,12 @@ cleanup_proc() {
pid=$1 pid=$1
kill -0 "$pid" 2>/dev/null && { kill -0 "$pid" 2>/dev/null && {
echo "$pid is running (sending term signal)..." echo "$pid is running (sending term signal)..."
kill -TERM "$pid" kill -TERM "$pid" 2>/dev/null
} }
} }
# shellcheck disable=SC2094 # 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 trap 'cleanup_proc $!' TERM INT