Fix error handling for fork failure.