Citrix
view release on metacpan or search on metacpan
Citrix/SessionSet.pm view on Meta::CPAN
if ($trace && $ENV{'HTTP_HOST'}) {print("<pre>");}
#if ($host =~ /\./) {die("Expecting bare hostname (got: $host)");}
if (!$host) {$usehost = $mh;$ap = ' -S';}
elsif ($ds) {$usehost = "$host.$ds";}
my $cmd = "rsh $usehost $Citrix::binpath/ctxquery -f $ctxcols $ap"; # -S
# Added loading of Net::Ping to circumvent
eval {require(Net::Ping);};
if ($@) {} # print("Dont have Net::Ping (risk hanging)");
else {
my $p = Net::Ping->new();
if ($p->ping($usehost)) {if ($trace) {print("$usehost is alive (reachable by PING).\n");}}
# Reuse $tout as state variable
else {$tout = 0;}
$p->close();
if (!$tout) {$ss->{'msg'} = "$usehost NOT Alive.\n";return(1);}
}
if ($trace) {print("Launch Query: $cmd\n");$times[0] = time();}
eval {
local $SIG{'ALRM'} = sub {
die("RSH Timeout ($usehost)\n");
die("Host '$usehost' was unable to return session within $tout\n");
( run in 0.660 second using v1.01-cache-2.11-cpan-39bf76dae61 )