Messages in this thread | | | Date | Wed, 31 Jan 2024 15:12:04 +0100 | From | Oleg Nesterov <> | Subject | Re: [PATCH v3 0/1] pidfd: implement PIDFD_THREAD flag for pidfd_open() |
| |
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.
| |