From 52847d834188dce22fe89c75810ebfbb1042ea48 Mon Sep 17 00:00:00 2001 From: Marco Peereboom Date: Sun, 13 Sep 2009 21:37:39 +0000 Subject: [PATCH] kill iostat when restarting scrotwm from Joe Gidi --- baraction.sh | 2 ++ 1 file changed, 2 insertions(+) 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` -- 2.39.2