oh, you want to get the underlying pid of a pidfd? open `/proc/self/fdinfo/<fd>` (handle all possible error conditions along the way), read it out line by line, find a line that begins with `Pid:`, strip its whitespace (handle all possible error conditions along the way), and parse the number contained in the leftover string (handle all possible error conditions along the way)
-- statements dreamed up by the utterly Deranged