my ($out, $pid) = $ssh->pipe_out("$cmd"); my $sel = new IO::Select($out); my $str = ""; while (1) { @ready = $sel->can_read(1); if(@ready > 0) { if(my $new = <$out>) { $str .= $new; } else { last; } } if ($ConnectionDeadline < time()) { kill 15, $pid; $str .= "\nConnection timeout\n"; last; } }
In reply to Re^4: Net::OpenSSH how to stop(zap) capturing after time
by Anonymous Monk
in thread Net::OpenSSH how to stop(zap) capturing after time
by MiklerGM
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |