udp_proxy_wrapper.sh: fix cleanup not cleaning up
Fixed cleanup leaving the actual udp_proxy behind and only killing an
intermediate shell process.
Fixed trap handler cleaning up but then not dying.
diff --git a/programs/test/udp_proxy_wrapper.sh b/programs/test/udp_proxy_wrapper.sh
index fa13596..29033d5 100755
--- a/programs/test/udp_proxy_wrapper.sh
+++ b/programs/test/udp_proxy_wrapper.sh
@@ -29,7 +29,7 @@
cleanup() {
stop_server
stop_proxy
- return 1
+ exit 129
}
trap cleanup INT TERM HUP
@@ -96,7 +96,7 @@
if [ $VERBOSE -gt 0 ]; then
echo "[ $tpxy_cmd_snippet ]"
fi
-eval "$tpxy_cmd_snippet" >/dev/null 2>&1 &
+eval exec "$tpxy_cmd_snippet" >/dev/null 2>&1 &
tpxy_pid=$!
if [ $VERBOSE -gt 0 ]; then
@@ -108,7 +108,7 @@
echo "[ $SRV_BIN $* ]"
fi
-"$SRV_BIN" "$@" >&2 &
+exec "$SRV_BIN" "$@" >&2 &
srv_pid=$!
wait $srv_pid