Sluggers,
Got me a perl problem, this code runs fine on Solaris but "hangs"
on Linux.
The perl wakes up every x minutes, checks if a socket can be
established to a server on port 80, if so go back to sleep,
else do something about it. The problem is that the perl hangs
at the socket open when the server is down. As I said the code
works fine on solaris.....(doh!), is there something tricky
about Linux?
$TIMEOUT = 12;
$HOST_ADDR = "172.16.1.254";
print "opening socket to $HOST_ADDR\n";
$sock = (IO::Socket::INET->new( PeerAddr => $HOST_ADDR,
PeerPort => 80,
Proto => 'tcp',
Timeout => $TIMEOUT));
The code runs fine when the 172.16.1.254 apache server is up, but
it just hangs at the socket open when the apache server is down.
Any ideas?
Many Tia's
Pete
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug