[LTP] [PATCH v2] Introduce ioctl_pidfd_get_info_supported() function

Cyril Hrubis chrubis@suse.cz
Tue Sep 23 13:49:19 CEST 2025


Hi!
> > Generally I do not like this code that much, since we depend on the fact
> > that we get ESCHR from the syscall if PIDFD_INFO_EXIT is not
> > implemented. Without the PIDFD_INFO_EXIT flag the pidfd_info() syscall
> > is supposed to work on a process before it's waited for and
> > PIDFD_INFO_EXIT does not work before the process is waited for, mixing
> > these two checks is a bit ugly.
> 
> Avinesh, I'm sorry, I see my suggestion to reuse code to detect PIDFD_INFO_EXIT
> for checking PIDFD_GET_INFO was not a good idea. It'll be clearer to have them
> separated.

We went through a few iteration of the check with Andrea before we
arrived at a working version. Sometimes detecting features gets
complex...

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list