in reply to Capturing Errors from Forked Processes
If you're trying to get the exit status of your child processes (after you fork), you need to examine $? after your wait or waitpid calls (when you reap your child processes).
If you're consistently getting -1 with system and $?, regardless of whether or not there was an error, I would say that's odd and that something is not as you say it is. Test your assumptions again.
|
|---|