Check program exit code properly

The return value of posix_spawnp() was being checked but the exit status
of the child process was being ignored. This adds checks and error
reporting based on the status that waitpid returns.

Signed-off-by: Andrew Price <anprice@redhat.com>
1 file changed