Set error return code if forked process fails.

If forked process has received terminating signal do not return success
exit code.