it will be possible with a new ioctl(..PIDFD_INFO_PID) but as kernel 6.12 is still under development.