[PATCH v8 6/7] posix: Add fork_np (BZ 26371)
Florian Weimer
fweimer@redhat.com
Thu Aug 24 06:07:15 GMT 2023
* Adhemerval Zanella:
> Returning a pidfd allows a process to keep a race-free handle to a child
> process. However, to create a process file descriptor the caller needs
> to use pidfd_open which still might be subject to TOCTOU.
>
> The implementation assures that the kernel must support the complete
> pidfd interface, meaning that waitid (P_PIDFD) should be supported. It
> ensures that a non-racy workaround is required (such as reading procfs
> fdinfo pid to use along with old wait interfaces). If the kernel does
> not have the required support the interface returns -1 and set errno to
> ENOSYS.
Please skip this for now.
Thanks,
Florian
More information about the Libc-alpha
mailing list