in reply to Re: Two-Part Socket Question.
in thread Two-Part Socket Question.

There's not a straightforward way to do that. File descriptors are shared between parent and child, but not between siblings, so even if two sibling processes knew the file descriptor number they wouldn't be able to write to it.

The way that's closest to what you want is probably the most complicated way. If each parent and child maintain a socket between them, the parent can send new file descriptors to all children with ioctl.

A more straightforward way to handle it would be to have the parent process act as a central point for distributing information; it receives messages from each client over a pipe/socket, then writes them out to all of the other clients.

Another possibility is to write messages that should be sent into a shared memory segment, created with mmap or shmget.

Yet another possibility is to create threads instead of processes, since all threads in a process share file descriptors (though you should probably use locking to make sure writes to file descriptors don't get intermingled).