RECVFD(1)

πŸ“¦ version 2024.12.07, in nixpkgs unstable

πŸ’– recvfd(1) β€” The recvfd program πŸ’–

okay so bestie, this page is literally about recvfd, and it’s giving β€œreceive file descriptors over a socket, then exec a command” energy ✨

🌸 SYNOPSIS 🌸

recvfd socket {fd|$VAR} [...] : command arg ...

πŸ¦‹ DESCRIPTION πŸ¦‹

recvfd receives one or more file descriptors over a Unix-domain socket (such as those opened with s6-ipcclient (https://skarnet.org/software/s6/s6-ipcclient.html)/s6-ipcserver (https://skarnet.org/software/s6/s6-ipcserver.html) or ucspi-unix (http://untroubled.org/ucspi-unix/)). Another process that has a descriptor for the other end of the socket can send the descriptors using the fd_xfer_send() library function. The received descriptors will not necessarily have the same numeric values, but will refer to the same open file handles, as if by dup(). After receiving the descriptors, recvfd moves them to the descriptor numbers specified on the command line with dup2(), or sets the given environment variables (prefixed with $) to indicate what descriptor numbers were received. Finally, recvfd execs the given command. A colon separates the file descriptors and environment variable names from the command.

This is useful, for example, in network clients that want to use UCSPI client programs to establish connections, but which can’t have all connections opened at startup.


and that’s the whole page, bestie πŸ’… the footer is just The recvfd program with empty parentheses β€” no extra source/version/date listed in this page 🫢✨

πŸ“¦ where this page comes from