fn wait_process_stopped(pid: Pid) -> Result<()>