From 58d4a344764e1a122723f9719908fb6b91390167 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Mon, 30 Apr 2018 17:03:31 +0100 Subject: [PATCH] wrap: Clean up after the game exits Signed-off-by: Simon McVittie <smcv@collabora.com> --- pressure-vessel-wrap | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/pressure-vessel-wrap b/pressure-vessel-wrap index 718c18194..4ce301e4b 100755 --- a/pressure-vessel-wrap +++ b/pressure-vessel-wrap @@ -739,8 +739,15 @@ if [ -n "$verbose" ]; then echo "$me: '$BWRAP ${bwrap_options[*]} $bwrap_end_of_options ${wrapped_command[*]}'" >&2 fi -exec "$BWRAP" "${bwrap_options[@]}" $bwrap_end_of_options "${wrapped_command[@]}" || e=$? -echo "$me: failed to execute '$BWRAP ${bwrap_options[*]} $bwrap_end_of_options ${wrapped_command[*]}': exec status $e" >&2 +e=0 +"$BWRAP" "${bwrap_options[@]}" $bwrap_end_of_options "${wrapped_command[@]}" || e=$? +if [ "$e" -eq 0 ]; then + if [ -n "$verbose" ]; then + echo "$me: '$BWRAP ${bwrap_options[*]} $bwrap_end_of_options ${wrapped_command[*]}': successful" >&2 + fi +else + echo "$me: failed to execute '$BWRAP ${bwrap_options[*]} $bwrap_end_of_options ${wrapped_command[*]}': exec status $e" >&2 +fi exit "$e" # vim:set sw=4 sts=4 et: -- GitLab