Re: [PATCH v3 0/1] pidfd: implement PIDFD_THREAD flag for pidfd_open()
From: Oleg Nesterov
Date: Wed Jan 31 2024 - 09:14:25 EST
Before I forget this...
After this patch we can easily add another feature, pidfd_poll()
can add, say, POLLHUP to poll_flags if the pid is "dead".
So the user can do
poll(pidfd, { .revents = POLLHUP });
and it will block until release_task() is called and this pid is
no longer in use (pid_task() == NULL).
Do you think this can be useful?
Oleg.