Re: [RFC 1/3] pidfd: allow pidfd_open() on non-thread-group leaders

From: Florian Weimer
Date: Fri Dec 08 2023 - 08:16:09 EST


* Christian Brauner:

> File descriptors are reachable for all processes/threads that share a
> file descriptor table. Changing that means breaking core userspace
> assumptions about how file descriptors work. That's not going to happen
> as far as I'm concerned.

It already has happened, though? Threads are free to call
unshare(CLONE_FILES). I'm sure that we have applications out there that
expect this to work. At this point, the question is about whether we
want to acknowledge this possibility at the libc level or not.

Thanks,
Florian