in reply to Multi threaded server [fork]
Semantic quibble: these aren't threads, they're processes. There's a big difference with regard to synchronicity and shared resources.
That said, what happens if you close the connection in the parent after you've forked off a child? If one process still has a connection open to the client, how does the client know it's finished reading? You might be able to get away with this:
while (my $client = $server->accept()) { # as normal }
This is untested, though, and I haven't looked in a networking book to be sure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Multi threaded server [fork]
by Deda (Novice) on Aug 07, 2003 at 08:22 UTC |