New system calls: pidfd_open() and close_range()
New system calls: pidfd_open() and close_range()
Posted Jul 30, 2019 23:30 UTC (Tue) by immibis (subscriber, #105511)In reply to: New system calls: pidfd_open() and close_range() by quotemstr
Parent article: New system calls: pidfd_open() and close_range()
The killer problem (to me) with procfs is that you have to open an FD in order to close any FDs. What if the process has reached the maximum number of FDs? Do you try to close arbitrary FDs in the hope of hitting one that is actually open, so that you can then open /proc/self/fd in order to know the rest of the FDs to close?