aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2010-03-08 18:03:12 +0200
committerFilipp Lepalaan <filipp@mac.com>2010-03-08 18:03:12 +0200
commit75e8f5f66e32aecf06e8817c2c91c9da543e87a5 (patch)
treefb98b020d732cd2d7e5b7535a1e659a8e9b910fd
parent4662c292aecd8df0c9977e9e80b9854f19f83ac4 (diff)
downloadmtk-75e8f5f66e32aecf06e8817c2c91c9da543e87a5.tar.gz
mtk-75e8f5f66e32aecf06e8817c2c91c9da543e87a5.tar.bz2
mtk-75e8f5f66e32aecf06e8817c2c91c9da543e87a5.zip
Added cleanup, sig handling
-rwxr-xr-xhellyeah.command3
1 files changed, 2 insertions, 1 deletions
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 <filipp@mcare.fi>
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))