I'm running shell scripts in parallel like below. Both scripts return code is ZERO but one of them is actually returning 2. Any idea what could be the issue. Based on return code i decide whether its success/fail
./shellscript1.sh & pid1=$!
ReturnCode=$?
./shellscript2.sh & pid2=$!
checkFlagReturnCode=$?
wait $pid1
wait $pid2