From 75e8f5f66e32aecf06e8817c2c91c9da543e87a5 Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Mon, 8 Mar 2010 18:03:12 +0200 Subject: Added cleanup, sig handling --- hellyeah.command | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hellyeah.command b/hellyeah.command index 2b8c692..1d9b339 100755 --- a/hellyeah.command +++ b/hellyeah.command @@ -4,7 +4,6 @@ # @author Filipp Lepalaan MYDIR=/private/tmp/_hellyeah - CORES=$(sysctl hw.logicalcpu_max | cut -d : -f 2 | sed 's/ //') for (( i = 0; i < ${CORES}; i++ )); do @@ -15,6 +14,8 @@ if [[ ! -d "${MYDIR}" ]]; then mkdir "${MYDIR}" fi +trap "killall yes; rm ${MYDIR}; echo Killed; exit 255" SIGINT SIGTERM + while true; do for k in 10 100 1000 10000; do BLOCKS=$(($k*1024/512)) -- cgit v1.2.3