Propogate the exit codes of the wrapped binary. Bug #57741 . Thanks to harinath@cs.umn.edu (Raja Harinath) for the patch.

git-svn-id: svn://10.0.0.236/trunk@81752 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cls%seawood.org 2000-10-25 20:32:37 +00:00
parent 062b3cb89b
commit 98ccdcfa4a
2 changed files with 10 additions and 2 deletions

View File

@ -63,6 +63,8 @@ MOZ_DIST_BIN=`dirname $0`
MOZ_APPRUNNER_NAME="./mozilla-bin"
MOZ_VIEWER_NAME="./viewer"
MOZ_PROGRAM=""
exitcode=0
#
##
## Functions
@ -187,6 +189,7 @@ moz_run_program()
## Run the program
##
$prog ${1+"$@"}
exitcode=$?
if [ "$DEBUG_CORE_FILES" ]
then
if [ -f core ]
@ -249,12 +252,15 @@ moz_debug_program()
case `basename $debugger` in
gdb) echo "$debugger $prog -x /tmp/mozargs$$"
$debugger $prog -x /tmp/mozargs$$
exitcode=$?
;;
ddd) echo "$debugger --debugger \"gdb -x /tmp/mozargs$$\" $prog"
$debugger --debugger "gdb -x /tmp/mozargs$$" $prog
exitcode=$?
;;
*) echo "$debugger $prog ${1+"$@"}"
$debugger $prog ${1+"$@"}
exitcode=$?
;;
esac
/bin/rm /tmp/mozargs$$
@ -371,3 +377,5 @@ then
else
moz_run_program ${1+"$@"}
fi
exit $exitcode

View File

@ -16,7 +16,7 @@
# Reserved.
#
## $Id: mozilla,v 1.8 2000-06-17 00:54:07 brendan%mozilla.org Exp $
## $Id: mozilla,v 1.9 2000-10-25 20:32:36 cls%seawood.org Exp $
##
## Usage:
##
@ -63,4 +63,4 @@ done
eval "set -- $moreargs"
echo $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
$dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"
exec $dist_bin/run-mozilla.sh $script_args $dist_bin/$MOZILLA_BIN "$@"