Implement SCM_PIDFD, a new type of CMSG type analogical to SCM_CREDENTIALS, but it contains pidfd instead of plain pid, which allows programmers not to care about PID reuse problem. We mask SO_PASSPIDFD feature if CONFIG_UNIX is not builtin because it depends on a pidfd_prepare() API which is not exported to the kernel modules. Idea comes from UAPI kernel group: https://uapi-group.org/kernel-features/ Big thanks to Christian Brauner and Lennart Poettering for productive discussions about this.
Showing the changes to include/uapi (1 of 12 files). Show all
Unified · Split
| @@ -132,6 +132,8 @@ · 131 unmodified lines | |||
| 132 | 132 | ||
| 133 | #define SO_RCVMARK 75 | 133 | #define SO_RCVMARK 75 |
| 134 | 134 | ||
| 135 | #define SO_PASSPIDFD 76 | ||
| 136 | |||
| 135 | #if !defined(__KERNEL__) | 137 | #if !defined(__KERNEL__) |
| 136 | 138 | ||
| 137 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) | 139 | #if __BITS_PER_LONG == 64 || (defined(__x86_64__) && defined(__ILP32__)) |