X-Git-Url: https://code.delx.au/spectrwm/blobdiff_plain/1984ff720fb781184a0504d151692f9432801b13..52847d834188dce22fe89c75810ebfbb1042ea48:/baraction.sh diff --git a/baraction.sh b/baraction.sh index 03c32d2..d8d519c 100644 --- a/baraction.sh +++ b/baraction.sh @@ -78,8 +78,10 @@ while :; do # instead of sleeping, use iostat as the update timer. # cache the output of apm(8), no need to call that every second. /usr/sbin/iostat -C -c 3600 |& # wish infinity was an option + PID="$!" APM_DATA="" I=0 + trap "kill $PID; exit" TERM while read -p; do if [ $(( ${I} % 1 )) -eq 0 ]; then APM_DATA=`/usr/sbin/apm -alb`