Skip to content
This repository
Browse code

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...
commit 87a80db7c0e8aa2c0d4d4d4a4ef73dd2004d3b69 1 parent 88725e2
Arianna Avanzini authored December 17, 2012 andreoli committed December 17, 2012

Showing 1 changed file with 2 additions and 0 deletions. Show diff stats Hide diff stats

  1. 2  full-trace.sh
2  full-trace.sh
@@ -421,6 +421,8 @@ if [[ $do_decoding == 1 ]]; then
421 421
 	echo "splitting the trace in $nr_cpu part$postfix"
422 422
 	split -n $nr_cpu $TRACEFILE $TRACEPREFIX
423 423
 
  424
+	trap "killall full-trace.sh" SIGINT SIGTERM
  425
+
424 426
 	for f in $(ls $TRACEPREFIX*); do
425 427
 		rewrite-address-split-trace $f &
426 428
 	done

0 notes on commit 87a80db

Please sign in to comment.
Something went wrong with that request. Please try again.