in reply to Re: Re: Forking Issue
in thread Forking Issue

Why does it need to be fork? The Run commands in parallel works on both Windows and *nix (where fork is somewhat less portable). Will that do for your (unspecified) real task?

Replies are listed 'Best First'.
Re: Re (tilly) 3: Forking Issue
by Anonymous Monk on Mar 18, 2001 at 00:21 UTC
    I'm trying desperately to get a timeout for socket connections on Win32. Trying to do something other than have them just hang the program.
    *sigh*
      IO::Socket has a timeout attribute that you can get/set. Does that work on Win32?

        Apparently, the timeout method exists in Win32. It is set to undef by default. Here's the sample code I used:

        my $sock = new IO::Socket; print $sock->timeout() || "undef"; # prints "undef" $sock->timeout(10); print $sock->timeout() || "undef"; # prints "10"

        Tested on Activestate 5.6.0 multi-threaded

        <kbd>--
        my $OeufMayo = new PerlMonger::Paris({http => 'paris.mongueurs.net'});</kbd>
        Nope. :-(