From 7167a073bfb0c89ef3fa173d958ffeeef7c79127 Mon Sep 17 00:00:00 2001 From: John Ganci Date: Fri, 6 Oct 2023 21:11:39 -0500 Subject: [PATCH] save rc after exec program --- bash/runcmdproc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/bash/runcmdproc b/bash/runcmdproc index 45aa79fb..d7604e0f 100755 --- a/bash/runcmdproc +++ b/bash/runcmdproc @@ -50,6 +50,8 @@ fi export TESTCMDFILE=${rtpath}/bash/testcmd3 bash/exec ${rtpath}/${program} +rc=$? +if [ $debug -eq 1 ]; then echo "${program}: rc=$rc"; fi if [ "$rc" -ne "0" ]; then echo "Error ${program} rc=$rc - exiting" exit $rc @@ -75,7 +77,9 @@ fi export TESTCMDFILE1=${rtpath}/bash/testcmd4a export TESTCMDFILE2=${rtpath}/bash/testcmd4b -bash/exec ${rtpath}/${program} noinit dump +bash/exec ${rtpath}/${program} +rc=$? +if [ $debug -eq 1 ]; then echo "${program} test 1: rc=$rc"; fi if [ "$rc" -ne "0" ]; then echo "Error ${program} rc=$rc - exiting" exit $rc @@ -85,7 +89,9 @@ fi export TESTCMDFILE1=${rtpath}/bash/testcmd4a export TESTCMDFILE2=${rtpath}/bash/testcmd4c -bash/exec ${rtpath}/${program} noinit dump +bash/exec ${rtpath}/${program} +rc=$? +if [ $debug -eq 1 ]; then echo "${program} test 2: rc=$rc"; fi if [ "$rc" -ne "0" ]; then echo "Error ${program} rc=$rc - exiting" exit $rc @@ -94,7 +100,10 @@ fi # names of test files for third test export TESTCMDFILE1=${rtpath}/bash/testcmd4c export TESTCMDFILE2=${rtpath}/bash/testcmd4b -bash/exec ${rtpath}/${program} noinit dump + +bash/exec ${rtpath}/${program} +rc=$? +if [ $debug -eq 1 ]; then echo "${program} test 3: rc=$rc"; fi if [ "$rc" -ne "0" ]; then echo "Error ${program} rc=$rc - exiting" exit $rc