From: Marco Peereboom Date: Sun, 13 Sep 2009 21:37:39 +0000 (+0000) Subject: kill iostat when restarting scrotwm X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=52847d834188dce22fe89c75810ebfbb1042ea48;p=spectrwm.git kill iostat when restarting scrotwm from Joe Gidi --- 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`