Dont fork above the $server->accept() line.
this is where it shuld be
while($client=$server->accept()){
next unless(fork()); #The server is forked and parent goes back to
# listen
.... # One child of the server serves the client
..... #
undef $client; # Close the socket
undef $server; # Close the forked server
# The server is not stopped because only the
# forked copy is closed
}
Mat Harris wrote:
Mark Goland wrote:
glad it worked, although the fork() was sepose to be after the while
loop.
Cheers,
Mark
----- Original Message ----- From: "Mat Harris"
<[EMAIL PROTECTED]>
To: "Mark Goland" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, December 31, 2002 6:08 AM
Subject: Re: more socket stuff - 2nd part
tried that and although it worked for the first connection, it still
hung on accepting the second.
either way your suggestion made it happen
--
Mat Harrison Network Systems Administrator
[EMAIL PROTECTED] www.genestate.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]