Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!oliveb!mipos3!td2cad!brister From: brister@td2cad.intel.com (James Brister) Newsgroups: comp.unix.questions Subject: Socket questions. Message-ID: Date: 8 Oct 89 20:58:01 GMT Sender: news@td2cad.intel.com Distribution: comp Organization: Intel Corp., Santa Clara, CA, USA Lines: 25 Hi, I have a couple of questions regarding sockets on Ultrix 3.x. 1) I have a process that listens to a socket, when a connection request comes in the process forks and the child takes care of the connection while the parent goes back to listening for more connections. I've seen code do this under the INET address family, but not under AF_UNIX and I was wondering... I haven't seen this stated in the doc set, but is it guaranteed that if two child process from the same parent are handling two connections at the same time that the connections are really seperate (i.e. reads/writes to one won't get crossed with the other). I'm about 95% certain this is safe (isn't this what lpd does?), but the overloading of the (socket) filename bothers me. Does this also work with AF_UNIX (guaranteed?). I've run some test cases and it looks good, but I don't want to use something that may someday blow up in my face. 2) Is there some way for a process to wait for connections on more than one socket and then handle the first one that comes through? (something along the lines of select) Or am I stuck using multiple processes? Thanks. James -- James Brister brister@td2cad.intel.com Intel Corp. {decwrl,oliveb}!td2cad!brister