Re: [RFC PATCH] pidfs: don't report autoreaped tasks readable before exit info exists
From: Oleg Nesterov
Date: Sun Oct 18 2026 - 12:31:26 EST
On 10/17, fujo wrote:
>
> Your POLLHUP remark resolves it: PIDFD_INFO_EXIT is published before the
> task linkage is removed, so POLLHUP is the right condition to wait for.
...
> I will withdraw the kernel patch and send a selftests-only v2.
Good ;)
> Do you
> think the CLONE_AUTOREAP cover letter or some KAPI comment should also
> say explicitly that POLLHUP, not POLLIN, guarantees that
> PIDFD_INFO_EXIT is available? The "poll the pidfd and retrieve the exit
> status via PIDFD_GET_INFO" wording is what led me there.
Well, I'm not quite sure which documentation you are referring to, but
of course it always makes sense to fix or improve the unclear doc.
Oleg.