mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-02-02 07:51:10 +00:00
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.
This commit is contained in:
parent
afc4f892d1
commit
8149321fed
|
@ -29,7 +29,7 @@ stop_server() {
|
||||||
cleanup() {
|
cleanup() {
|
||||||
stop_server
|
stop_server
|
||||||
stop_proxy
|
stop_proxy
|
||||||
return 1
|
exit 129
|
||||||
}
|
}
|
||||||
|
|
||||||
trap cleanup INT TERM HUP
|
trap cleanup INT TERM HUP
|
||||||
|
@ -96,7 +96,7 @@ echo " * Start proxy in background ..."
|
||||||
if [ $VERBOSE -gt 0 ]; then
|
if [ $VERBOSE -gt 0 ]; then
|
||||||
echo "[ $tpxy_cmd_snippet ]"
|
echo "[ $tpxy_cmd_snippet ]"
|
||||||
fi
|
fi
|
||||||
eval "$tpxy_cmd_snippet" >/dev/null 2>&1 &
|
eval exec "$tpxy_cmd_snippet" >/dev/null 2>&1 &
|
||||||
tpxy_pid=$!
|
tpxy_pid=$!
|
||||||
|
|
||||||
if [ $VERBOSE -gt 0 ]; then
|
if [ $VERBOSE -gt 0 ]; then
|
||||||
|
@ -108,7 +108,7 @@ if [ $VERBOSE -gt 0 ]; then
|
||||||
echo "[ $SRV_BIN $* ]"
|
echo "[ $SRV_BIN $* ]"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
"$SRV_BIN" "$@" >&2 &
|
exec "$SRV_BIN" "$@" >&2 &
|
||||||
srv_pid=$!
|
srv_pid=$!
|
||||||
|
|
||||||
wait $srv_pid
|
wait $srv_pid
|
||||||
|
|
Loading…
Reference in a new issue