From fcc3db78cd5fdf1b02e2339b722512b97998f28f Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Fri, 4 Feb 2022 18:14:13 +0100 Subject: slirp4netns: Add EXIT as condition for trap ...otherwise, we don't terminate pasta on regular exit, i.e. on a read from the "exit" file descriptor. Signed-off-by: Stefano Brivio --- slirp4netns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slirp4netns.sh b/slirp4netns.sh index e6a6049..518f581 100755 --- a/slirp4netns.sh +++ b/slirp4netns.sh @@ -206,7 +206,7 @@ fi ${PASTA} ${PASTA_OPTS} ${ns_spec} && \ [ ${RFD} -ne 0 ] && echo "1" >&${RFD} -trap "kill $(cat ${PASTA_PID}); rm ${PASTA_PID}" INT TERM +trap "kill $(cat ${PASTA_PID}); rm ${PASTA_PID}" INT TERM EXIT cat << EOF sent tapfd=5 for ${ifname} -- cgit v1.2.3