aboutgitcodebugslistschat
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-02-04 18:14:13 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-02-04 18:14:13 +0100
commitfcc3db78cd5fdf1b02e2339b722512b97998f28f (patch)
treee10733d007ca0d1b7ccce46be1c37a4fad74e4e9
parenta5d4a5156f1cc33068095ed5ba8cfb4c5557150f (diff)
downloadpasst-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar.gz
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar.bz2
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar.lz
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar.xz
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.tar.zst
passt-fcc3db78cd5fdf1b02e2339b722512b97998f28f.zip
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 <sbrivio@redhat.com>
-rwxr-xr-xslirp4netns.sh2
1 files changed, 1 insertions, 1 deletions
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}