serenity
serenity copied to clipboard
Kernel: Implement SCM_RIGHTS for Unix sockets
This lets us do fancy things and enables fd-passing more sanely over sockets.
Note that SCM_RIGHTS handling is already present in the kernel, but it piggybacks on the incompatible sendfd and recvfd mechanism.
We should make SCM_RIGHTS behave exactly the same as other Unixes, where the passed file descriptor is only part of a single message (as in sendmsg/recvmsg) and doesn't get queued up indefinitely on the socket (as we do in our sendfd/recvfd).
Related to #22357