in reply to Net::OpenSSH and tail -f
The only way I know to get OpenSSH to kill the remote process when the local one is terminated is requesting a tty:
That may generate a harmless warning from OpenSSH ssh that you can ignore.my ($in, $out, $pid) = $ssh->open2({tty => 1}, "tail -f /foo/bar"); ... kill TERM => $pid; waitpid $pid, 0; close $in; close $out;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Net::OpenSSH and tail -f
by farfabet (Initiate) on Feb 27, 2012 at 13:51 UTC |