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>
This commit is contained in:
Stefano Brivio 2022-02-04 18:14:13 +01:00
parent a5d4a5156f
commit fcc3db78cd

View file

@ -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}