Here is just a few quick thoughts I had. I know you can pass a timeout to things like http requests using
LWP on windows. I'm not sure if they work for
LWP on windows, but if they do, you can just go look at their code (why reinvent it?). If you installed activestate perl, then you should find that code in c:\Perl\site\lib\LWP unless you installed it custom on your own.
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
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.