lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1424745188.4443.9.camel@xylophone.i.decadent.org.uk>
Date:	Tue, 24 Feb 2015 02:33:08 +0000
From:	Ben Hutchings <ben.hutchings@...ethink.co.uk>
To:	netdev@...r.kernel.org
Cc:	linux-kernel@...ts.codethink.co.uk
Subject: [PATCH net-next 08/10] samples/pktgen: Trap SIGINT

Otherwise ^C stops the script, not just pktgen.

Signed-off-by: Ben Hutchings <ben.hutchings@...ethink.co.uk>
---
 samples/pktgen/pktgen.conf-1-1          |    1 +
 samples/pktgen/pktgen.conf-1-1-flows    |    1 +
 samples/pktgen/pktgen.conf-1-1-ip6      |    1 +
 samples/pktgen/pktgen.conf-1-1-ip6-rdos |    1 +
 samples/pktgen/pktgen.conf-1-1-rdos     |    1 +
 samples/pktgen/pktgen.conf-1-2          |    1 +
 samples/pktgen/pktgen.conf-2-1          |    1 +
 samples/pktgen/pktgen.conf-2-2          |    1 +
 8 files changed, 8 insertions(+)

diff --git a/samples/pktgen/pktgen.conf-1-1 b/samples/pktgen/pktgen.conf-1-1
index 4679803f6d9e..68eb6385d2fa 100755
--- a/samples/pktgen/pktgen.conf-1-1
+++ b/samples/pktgen/pktgen.conf-1-1
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-1-1-flows b/samples/pktgen/pktgen.conf-1-1-flows
index 34703639593f..a1973bc4cabb 100755
--- a/samples/pktgen/pktgen.conf-1-1-flows
+++ b/samples/pktgen/pktgen.conf-1-1-flows
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-1-1-ip6 b/samples/pktgen/pktgen.conf-1-1-ip6
index ab4323df3c05..39cddd36b370 100755
--- a/samples/pktgen/pktgen.conf-1-1-ip6
+++ b/samples/pktgen/pktgen.conf-1-1-ip6
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-1-1-ip6-rdos b/samples/pktgen/pktgen.conf-1-1-ip6-rdos
index 2d3298c53079..e7dbf4845c8f 100755
--- a/samples/pktgen/pktgen.conf-1-1-ip6-rdos
+++ b/samples/pktgen/pktgen.conf-1-1-ip6-rdos
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-1-1-rdos b/samples/pktgen/pktgen.conf-1-1-rdos
index 6a8bd27729ff..f4c3c4ebf228 100755
--- a/samples/pktgen/pktgen.conf-1-1-rdos
+++ b/samples/pktgen/pktgen.conf-1-1-rdos
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-1-2 b/samples/pktgen/pktgen.conf-1-2
index 98aaa87486d9..7dcdeab4363b 100755
--- a/samples/pktgen/pktgen.conf-1-2
+++ b/samples/pktgen/pktgen.conf-1-2
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-2-1 b/samples/pktgen/pktgen.conf-2-1
index 8b6311e8cb96..9fee8da739c7 100755
--- a/samples/pktgen/pktgen.conf-2-1
+++ b/samples/pktgen/pktgen.conf-2-1
@@ -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"
 
diff --git a/samples/pktgen/pktgen.conf-2-2 b/samples/pktgen/pktgen.conf-2-2
index e59e0d2ee8b7..29b338cc054d 100755
--- a/samples/pktgen/pktgen.conf-2-2
+++ b/samples/pktgen/pktgen.conf-2-2
@@ -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"
 
-- 
1.7.10.4




--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ