Permalink
Browse files

full-trace.sh: kill all threads on SIGINT and SIGTERM

During the operations related to trace decoding, the full-trace.sh
script divides the global workload into different threads. For
this reason, an interrupt does not really stop the program. This
commit traps SIGINT and SIGTERM, killing all the full-trace.sh
threads.
  • Loading branch information...
1 parent 88725e2 commit 87a80db7c0e8aa2c0d4d4d4a4ef73dd2004d3b69 @ariava ariava committed with Dec 17, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 full-trace.sh
View
2 full-trace.sh
@@ -421,6 +421,8 @@ if [[ $do_decoding == 1 ]]; then
echo "splitting the trace in $nr_cpu part$postfix"
split -n $nr_cpu $TRACEFILE $TRACEPREFIX
+ trap "killall full-trace.sh" SIGINT SIGTERM
+
for f in $(ls $TRACEPREFIX*); do
rewrite-address-split-trace $f &
done

0 comments on commit 87a80db

Please sign in to comment.