in reply to forking server

Let me look into my magic ball... Don't want to bother with shared memory? Pipes are yet another solution (since file descriptors are inherited by children.) I see Pipe Dreams in your future...What do you think WonderCat?
pipe(fd1,fd2); #make kiddies (not that! is that all you think about? {slap}) close(fd1); #in kiddie #back to sexless parent close(fd2); write(fd1,$data,x); #the kid just got some info on the pipe! x bytes!

AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.

Replies are listed 'Best First'.
RE: RE: forking server
by geektron (Curate) on Oct 13, 2000 at 03:14 UTC
    pipe is a good solution for unidirectional communication.

    socketpair works for bi-directional communication. i'm using it in a forking server right now, and it works like a charm.

      agreed, but all socketpair does is create two pipes and link them to the file descriptors so it's the same. Note that this is solution in all legacy UNIX software.
      AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.