in reply to forking server

I might be mistaken when I say this.. so don't be too harsh on me. :) Anyhow, when you fork each of your child "servers", that accept connections, they each get their own copy of the current %children. When they add the new child's socket to the children hash, it only goes to THEIR copy of the children hash. All other server children have their own copy, and the main server has it's own copy. In order to do what you are wanting to do, you will need to use some shared memory for the %children hash.
--
bliz

Replies are listed 'Best First'.
RE: Re: forking server
by Anonymous Monk on Oct 12, 2000 at 23:03 UTC
    how would I do this? I just tried accessing each fo the keys in %childern and it doesn't come up with anything ... Is there a better approach to this problem .. would a non-forkign server be better? I tried that first, but it didn't handle multiple connections very well.
      man perlfunc, and search for the following functions, which will allow you to allocate and access shared memory. I would also suggest reading up on some shared memory concepts and such. Good luck, hope it works out for you, and most of all -- that you learn a lot from it.

      shmctl, shmget, shmread, shmwrite
      --
      bliz