[PATCH] linux: use PIDFD_GET_INFO ioctl for pidfd_getpid() if available
Luca Boccassi
luca.boccassi@gmail.com
Mon Jan 26 12:37:22 GMT 2026
On Mon, 26 Jan 2026 at 08:59, Florian Weimer <fweimer@redhat.com> wrote:
>
> * luca boccassi:
>
> > From: Luca Boccassi <luca.boccassi@gmail.com>
> >
> > Linux v6.13 introduced a new ioctl to query info from a pidfd.
> > The advantage of this vs. parsing /proc/ is that it works even
> > when procfs is not mounted. It's also a single syscall, and doesn't
> > need manual string parsing. Use it when available.
>
> I think it's better if glibc functionality does not depend on what
> kernel headers are available at build time.
>
> Everything needed should already be available in <sys/pidfd.h>.
Sure, updated in v2 as requested, thanks.
More information about the Libc-alpha
mailing list