pub(crate) async fn wait_for_exit_code(pid: Pid) -> i32
Wait for a process to exit using pidfd_open for async polling, with a blocking waitpid fallback for older kernels.