You're only option is to spawn threads and detach them. Have them write
their results to a shared hash or something and define your own
timeout...if you don't see the result from that thread ID in X seconds,
declare it timed out and forget about it. When it actually does timeout
is will error and then die peacefully. Make sure your script is written
NOT to die on not connecting.

Perl does not support tcp connect timeouts in Win32.

:)
John

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Ng, Bill
> Sent: Friday, May 12, 2006 11:27 PM
> To: [email protected]
> Subject: Network Timeouts
> 
> 
> Dilemma,
> 
>       I have many scripts that have to hit every machine in 
> my domain .. about 2400.  I can't use Net::Ping to test the 
> alive status of the boxes because our internal DNS system is 
> a real PITA to clean up and using as-is will leave me with 
> bad results.
> 
>       For now, I'm doing a write test:  if (open (WRITETEST,
> ">c:\write.test")) { &doSomething(); } ... but the timeout on 
> such a test, if the machine its trying to reach is not 
> available, is just too long.
> 
>       Anyone have a way of me testing the connectivity to a 
> computer on the network that allows me to either configure 
> the timeout or has one between 1 and 2 seconds?
> 
> Bill in Brooklyn
> 
> _______________________________________________
> Perl-Win32-Users mailing list 
> [email protected]
> To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
> 

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to