From be67f53686ccf055e076dff59591489304204923 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 23 Jun 2015 10:15:44 -0700 Subject: [PATCH] Exit with the exit status of the command we ran. Also, expand a comment. Change-Id: Icbb8ead02f55087f3ac09747fe518f211d488172 Reviewed-on: https://code.wireshark.org/review/9057 Reviewed-by: Guy Harris --- test/run_and_catch_crashes | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/run_and_catch_crashes b/test/run_and_catch_crashes index 62c30735f5..482ee7e28f 100755 --- a/test/run_and_catch_crashes +++ b/test/run_and_catch_crashes @@ -3,17 +3,21 @@ # Run the command we're passed in a subshell, so that said subshell will # catch any signals from it and report it. # -# This is done for commands that aren't the last command in the +# This must be done for commands that aren't the last command in the # pipeline, as, given that the exit status of a pipeline is the exit # status of the last command in the pipeline, there's no guarantee that # the shell will bother to pick up the exit status of earlier commands # in the pipeline. # +# It can also be done for other tests, to get more information than +# "it crashed due to signal XXX" if the tests fail with a crash signal. +# # XXX - on OS X, core dumps are in /cores/core.{PID}; would they appear # elsewhere on any other UN*X? # rm -f core "$@" +exitstatus=$? if [ -r core ] then # @@ -112,3 +116,4 @@ EOF fi fi fi +exit $exitstatus