summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2012-12-26 12:45:34 -0800
committerBen Pfaff <blp@nicira.com>2012-12-26 13:03:29 -0800
commitee85571d9ff1ce50b4cc343bb58170ce1548738a (patch)
tree7ca5d0e9fcb4a4970b386d8aaa3532d9854b92c3
parent8963743a95f53933249e468492b163747f1b2b73 (diff)
downloadopenvswitch-ee85571d9ff1ce50b4cc343bb58170ce1548738a.tar.gz
ovs-ctl: Exit, instead of resuming, after handling fatal signals.
When I wrote the "trap" calls in ovs-ctl, I had the mistaken notion that "trap $cmd $signal" would execute $cmd and then exit when $signal was caught. This is incorrect. Instead, it executes $cmd and then resumes executing the shell script. On the other hand, "trap $cmd 0" does by itself what I wanted: it causes the shell to execute $cmd and then exits due to the signal. So this commit changes the offending traps to use this form. Bug #14290. Signed-off-by: Ben Pfaff <blp@nicira.com> Acked-by: Kyle Mestery <kmestery@cisco.com>
-rwxr-xr-xutilities/ovs-ctl.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index 41edb9312..f3f5bb20b 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -293,7 +293,7 @@ force_reload_kmod () {
stop
script=`mktemp`
- trap 'rm -f "$script"' 0 1 2 13 15
+ trap 'rm -f "$script"' 0
if action "Saving interface configuration" save_interfaces; then
:
else