Check exit status and pid for stack.sh