"Passing" File Descriptors


The following is pair of programs: the server, recv_fd receives a file descriptor over a UNIX domain socket, and then reads from the descriptor and prints the file's contents. The client, send_fd, connects to the server and sends a file descriptor over the connection.

recv_fd.c


      
send_fd.c


      

Additional files: