in reply to Win32: timing out a perl subroutine
Also, since fork is working on one of the latest perl releases by activestate on win 32 (see my post Re: Threads) you could do what you said and fork off the process, and have the parent poll for the child to return something on the return pipe, or if it didn't do it in time (use could use just use sleep in a loop to poll over certain time intervals) just kill the child. It sounds like you were having problems with forking in win32, so that's why I point out that node. Check out my other nodes at Eradicatore for more on win32 and forking. I've been posting a lot on that lately too.
oh, also look at IO::Socket::INET to see if there is good examples of using timeouts. Again, this may or may not be working on win32, but it's worth a shot to see if they already got this working.
Justin Eltoft
"If at all god's gaze upon us falls, its with a mischievous grin, look at him" -- Dave Matthews
|
|---|