summaryrefslogtreecommitdiff
path: root/utilities/ovs-ctl.in
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 12:46:28 -0800
commite044071be06ffd3540f7406dcc73288c733567b4 (patch)
tree10326caed9e925cfd455db91946727528fad955a /utilities/ovs-ctl.in
parenta4454ac67c6d38740914d157f73b5083f6912172 (diff)
downloadopenvswitch-e044071be06ffd3540f7406dcc73288c733567b4.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>
Diffstat (limited to 'utilities/ovs-ctl.in')
-rwxr-xr-xutilities/ovs-ctl.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in
index d770f425f..87e7a86dd 100755
--- a/utilities/ovs-ctl.in
+++ b/utilities/ovs-ctl.in
@@ -321,7 +321,7 @@ force_reload_kmod () {
script_interfaces=`mktemp`
script_flows=`mktemp`
- trap 'rm -f "${script_interfaces}" "${script_flows}" ' 0 1 2 13 15
+ trap 'rm -f "${script_interfaces}" "${script_flows}" ' 0
action "Saving flows" save_flows
@@ -382,7 +382,7 @@ force_reload_kmod () {
restart () {
if daemon_is_running ovsdb-server && daemon_is_running ovs-vswitchd; then
script_flows=`mktemp`
- trap 'rm -f "${script_flows}"' 0 1 2 13 15
+ trap 'rm -f "${script_flows}"' 0
action "Saving flows" save_flows
fi