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>
script_datapaths=`mktemp`
script_flows=`mktemp`
trap 'rm -f "${script_interfaces}" "${script_flows}" \
- "${script_datapaths}"' 0 1 2 13 15
+ "${script_datapaths}"' 0
action "Saving flows" save_flows
restart () {
script_flows=`mktemp`
- trap 'rm -f "${script_flows}"' 0 1 2 13 15
+ trap 'rm -f "${script_flows}"' 0
action "Saving flows" save_flows