simple polling approach (this master script itself may not run parallel, vulnerable to symlink attacks through unsafe tmp file creation, ...)
Code:
#!/bin/bash
# should work in most shells
(script1; echo $? > /tmp/retval1 ) &
script2
# both do now run in parallel
# ...
# well, after some time script2 will have finished, so well have to check whether 2 also has
retval2=$?
while [ $? -eq 0 ]
do
sleep 1s
pidof script1 > /dev/null
done
retval1=`cat /tmp/retval1`
if [ something about retval1 and retval2 ]
then
script3
fi