From: <cba...@us...> - 2003-08-17 05:53:45
|
"Josh McAllister" writes: > [snip] > > What I discovered is that ping waits until it gets a reply and = > everything else is blocked waiting for ping to finish. > > Simple fix: > > ping -w3 -c1 host > > Causes to timeout and exit after 3 seconds. still returns non-zero if = > ping failed. > > Not sure how portable this is, but please investigate. Maybe some others > will comment? FYI, starting in 2.0.0, configure.pl does this for a new install (it keeps the current value for an upgrade): if ( $^O eq "solaris" || $^O eq "sunos" ) { $Conf{PingCmd} = '$pingPath -s $host 56 1'; } elsif ( ($^O eq "linux" || $^O eq "openbsd" || $^O eq "netbsd") && !system("$Conf{PingClientPath} -c 1 -w 3 localhost") ) { $Conf{PingCmd} = '$pingPath -c 1 -w 3 $host'; } else { $Conf{PingCmd} = '$pingPath -c 1 $host'; } So it should use ping -c 1 -w 3 $host if that works. Otherwise it falls back to ping -c 1 $host. Oops, I see a typo: $Conf{PingClientPath} should be $Conf{PingPath}, so that's why it incorrectly fell back to ping -c 1 $host. I'll fix that in 2.0.1 and CVS. Craig |