Possible Duplicate:
shell – get exit code of background process
I have a bash scripts which runs another bash script in the background (bash -i -c "blah &") the very first thing, and then continues with its own business!
The problem is how can I check at the very end, if the other script failed or not?
After launching script in the background, remember its PID:
At the very end, wait for this PID. The result code of wait would be the result code of background script.