fork() in perl on windows

Posted by Darioush on Stack Overflow See other posts from Stack Overflow or by Darioush
Published on 2010-03-14T00:23:09Z Indexed on 2010/03/14 0:25 UTC
Read the original article Hit count: 600

Filed under:
|
|
|
|

I'm using fork() on PERL in windows (activeperl) for a basic socket server, but apparently there are problems (it won't accept connections after a few times), is there any workaround?

while($client = $bind->accept()) {
    $client->autoflush();
    if(fork()){ $client->close(); }
    else { $bind->close(); new_client($client); exit(); }
}

is the portion of the relevant code.

© Stack Overflow or respective owner

Related posts about perl

Related posts about Windows