Tell the main loop to terminate when we catch a signal instead of trying

to clean up in two places.

svn path=/trunk/; revision=42133
This commit is contained in:
Gerald Combs 2012-04-18 16:04:05 +00:00
parent 5187255e38
commit bb606959f7
2 changed files with 2 additions and 3 deletions

View File

@ -137,7 +137,7 @@ echo "Running $TSHARK with args: $TSHARK_ARGS ($HOWMANY)"
echo ""
# Clean up on <ctrl>C, etc
trap "rm -f $TMP_DIR/$TMP_FILE $TMP_DIR/$ERR_FILE; echo ""; exit 0" HUP INT TERM
trap "MAX_PASSES=1; echo 'Caught signal'" HUP INT TERM
##############################################################################

View File

@ -80,8 +80,7 @@ echo "Running $TSHARK with args: $TSHARK_ARGS ($HOWMANY)"
echo "Running $RANDPKT with args: $RANDPKT_ARGS"
echo ""
# Not yet - properly handle empty filenames
#trap "rm $TMP_DIR/$TMP_FILE $TMP_DIR/$RAND_FILE; exit 1" 1 2 15
trap "MAX_PASSES=1; echo 'Caught signal'" HUP INT TERM
# Iterate over our capture files.
PASS=0