server: Move the process pipe hangup handling into kill_process.