Why does my ActivePerl program on Windows stop accepting socket connections?
        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/15
            19:09 UTC
        
        
        Read the original article
        Hit count: 472
        
I'm using fork() on Perl on 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?
Here is the portion of the relevant code:
while($client = $bind->accept()) {
    $client->autoflush();
    if(fork()){ $client->close(); }
    else { $bind->close(); new_client($client); exit(); }
}
© Stack Overflow or respective owner