Commit c24b3818 authored by rna's avatar rna
Browse files

Add SIGINT handler to entrypoint.

parent 3a5482f7
Pipeline #2977 passed with stages
in 1 minute and 41 seconds
...@@ -73,7 +73,8 @@ start=$(date +%s.%N); ...@@ -73,7 +73,8 @@ start=$(date +%s.%N);
echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters: \"$NETEM_PARAMS\"" echo "Running PRRT with command: \"$command $PRRT_PARAMS\" and link parameters: \"$NETEM_PARAMS\""
#tc qdisc add dev $dev root netem $NETEM_PARAMS #tc qdisc add dev $dev root netem $NETEM_PARAMS
LOG=`/prrt/$command $PRRT_PARAMS 2>&1` trap 'echo "Caught SIGINT."; killall -SIGINT $command' INT
LOG=$(/prrt/$command $PRRT_PARAMS 2>&1)
printf "$LOG\n" printf "$LOG\n"
echo "Exit status: $?" echo "Exit status: $?"
dur=$(echo "$(date +%s.%N) - $start" | bc); dur=$(echo "$(date +%s.%N) - $start" | bc);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment