samples/pktgen: Trap SIGINT

Otherwise ^C stops the script, not just pktgen.

Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ben Hutchings 2015-02-24 02:33:08 +00:00 committed by David S. Miller
parent db72aba30a
commit 16b5d0c4a2
8 changed files with 8 additions and 0 deletions

View File

@ -53,6 +53,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -61,6 +61,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -54,6 +54,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -57,6 +57,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -58,6 +58,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -63,6 +63,7 @@ PGDEV=/proc/net/pktgen/eth2
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -60,6 +60,7 @@ PGDEV=/proc/net/pktgen/eth1
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"

View File

@ -67,6 +67,7 @@ PGDEV=/proc/net/pktgen/eth2
PGDEV=/proc/net/pktgen/pgctrl
echo "Running... ctrl^C to stop"
trap true INT
pgset "start"
echo "Done"