1
0
mirror of https://passt.top/passt synced 2024-09-28 10:05:47 +00:00

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}