diff options
author | Guy Harris <guy@alum.mit.edu> | 2015-06-23 10:15:44 -0700 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2015-06-23 17:16:12 +0000 |
commit | be67f53686ccf055e076dff59591489304204923 (patch) | |
tree | 8c211df91cb72f9275c43028afe3c4821fe36773 /test | |
parent | b59e28dd24c7286c5170cdf9ea15d5d433d724d6 (diff) |
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 <guy@alum.mit.edu>
Diffstat (limited to 'test')
-rwxr-xr-x | test/run_and_catch_crashes | 7 |
1 files changed, 6 insertions, 1 deletions
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 |