From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Brivio To: passt-dev@passt.top Subject: [PATCH 02/18] slirp4netns: Add EXIT as condition for trap Date: Tue, 22 Feb 2022 02:34:18 +0100 Message-ID: <20220222013434.4116044-3-sbrivio@redhat.com> In-Reply-To: <20220222013434.4116044-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2034238414927978718==" --===============2034238414927978718== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ...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} -- 2.34.1 --===============2034238414927978718==--