fork_worker: refactor child exit