Make forkProcess exception safe