mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-22 20:57:53 +00:00
Fixed bug #41964: --controlmaster not sems to reuse OpenSSH connections to the same host
This commit is contained in:
parent
67a874362f
commit
f2c1f65a5a
|
@ -221,12 +221,16 @@ New in this release:
|
|||
|
||||
* GNU Parallel was used (unfortunately with improper citation) in: Perspectives in magnetic resonance: NMR in the post-FFT era http://www.sciencedirect.com/science/article/pii/S1090780713003054
|
||||
|
||||
* Org-mode with Parallel Babel http://draketo.de/english/emacs/parallel-babel#sec-2
|
||||
|
||||
* Speeding Up Grep Log Queries with GNU Parallel http://www.cybersecurity.io/speeding-grep-queries-gnu-parallel/
|
||||
|
||||
* How to run tbss_2_reg in parallel http://tadpolebrainimaging.blogspot.dk/2014/03/how-to-run-tbss2reg-in-parallel.html
|
||||
|
||||
* Iterative DNS Brute Forcing http://www.room362.com/blog/2014/02/19/iterative-dns-brute-forcing/
|
||||
|
||||
* Ejecutando comandos en paralelo http://jesusmercado.com/guias/ejecutando-comandos-en-paralelo/
|
||||
|
||||
* Bug fixes and man page updates.
|
||||
|
||||
|
||||
|
|
16
src/parallel
16
src/parallel
|
@ -3833,13 +3833,15 @@ sub sshcommand_of_sshlogin {
|
|||
$Global::sshmaster{$pid} ||= 1;
|
||||
} else {
|
||||
$SIG{'TERM'} = undef;
|
||||
# OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt
|
||||
# STDERR >/dev/null to ignore "process_mux_new_session: tcgetattr: Invalid argument"
|
||||
open(STDERR,">","/dev/null");
|
||||
open(STDIN,"<","/dev/null");
|
||||
# Run a sleep that outputs data, so it will discover if the ssh connection closes.
|
||||
my $sleep = ::shell_quote_scalar('$|=1;while(1){sleep 1;print "foo\n"}');
|
||||
my @master = ("ssh", "-tt", "-MTS", $control_path, $serverlogin, "perl", "-e", $sleep);
|
||||
# Ignore the 'foo' being printed
|
||||
open(STDOUT,">","/dev/null");
|
||||
# OpenSSH_3.6.1p2 gives 'tcgetattr: Invalid argument' with -tt
|
||||
# STDERR >/dev/null to ignore "process_mux_new_session: tcgetattr: Invalid argument"
|
||||
open(STDERR,">","/dev/null");
|
||||
open(STDIN,"<","/dev/null");
|
||||
# Run a sleep that outputs data, so it will discover if the ssh connection closes.
|
||||
my $sleep = ::shell_quote_scalar('$|=1;while(1){sleep 1;print "foo\n"}');
|
||||
my @master = ("ssh", "-tt", "-MTS", $control_path, $serverlogin, "perl", "-e", $sleep);
|
||||
::debug("@master\n");
|
||||
exec(@master);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,4 @@ echo '### --wd no-such-dir'
|
|||
stdout parallel --wd /no-such-dir -S csh@localhost echo ::: 1; echo Exit code $?
|
||||
stdout parallel --wd /no-such-dir -S tcsh@localhost echo ::: 1; echo Exit code $?
|
||||
stdout parallel --wd /no-such-dir -S parallel@localhost echo ::: 1; echo Exit code $?
|
||||
|
||||
|
||||
EOF
|
||||
|
|
Loading…
Reference in a new issue