From ee85571d9ff1ce50b4cc343bb58170ce1548738a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 26 Dec 2012 12:45:34 -0800 Subject: 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 Acked-by: Kyle Mestery --- utilities/ovs-ctl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/ovs-ctl.in b/utilities/ovs-ctl.in index 41edb931..f3f5bb20 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 -- cgit v1.2.3