Sockets and File descriptors

Please make sure that you have read our rules. And note:
(6) Do not post classroom or homework problems.

Once in a while we bend the rules a bit, so I'll make one suggestion before closing the thread. Your server children processes need to have a Unix domain socket to talk with the master server. (Use AF-UNIX instead of AF-INET.) Then read the man pages for the system calls sendmsg() and recvmsg(). Where they talk about sending "access rights" is what you want. Bear in mind that you will be creating a new fd that references the same open file as the old fd. So the sending process may send, say, fd 9 and the receiving process might establish, say, fd 21. This works for and fd, including any socket. And there is no other standard way to transfer an fd between processes.