P
priya
Once The eval alarm occurs it goes to the next host but my ssh for
the previous host is still hanging in the background process.How do i
kill the ssh once the timeout occurs?
foreach $host
eval {
local $SIG{ALRM} = sub {die "timeout\n"};
alarm 60;
system "$ssh","$host",$cmd
alarm 0;
};
if ($@ eq "timeou\n") {
printf("Aborted due to time out");
}
Thanx
priya
the previous host is still hanging in the background process.How do i
kill the ssh once the timeout occurs?
foreach $host
eval {
local $SIG{ALRM} = sub {die "timeout\n"};
alarm 60;
system "$ssh","$host",$cmd
alarm 0;
};
if ($@ eq "timeou\n") {
printf("Aborted due to time out");
}
Thanx
priya