mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 23:47:53 +00:00
Fixed bug #36657: --load does not work with custom ssh.
This commit is contained in:
parent
67d4db2279
commit
7a76e79185
|
@ -2096,6 +2096,8 @@ sub new {
|
||||||
}
|
}
|
||||||
my $string = $sshlogin_string;
|
my $string = $sshlogin_string;
|
||||||
my @unget = ();
|
my @unget = ();
|
||||||
|
my $no_slash_string = $string;
|
||||||
|
$no_slash_string =~ s/[^-a-z0-9:]/_/gi;
|
||||||
return bless {
|
return bless {
|
||||||
'string' => $string,
|
'string' => $string,
|
||||||
'jobs_running' => 0,
|
'jobs_running' => 0,
|
||||||
|
@ -2109,11 +2111,11 @@ sub new {
|
||||||
'control_path' => undef,
|
'control_path' => undef,
|
||||||
'time_to_login' => undef,
|
'time_to_login' => undef,
|
||||||
'loadavg_file' => $ENV{'HOME'} . "/.parallel/tmp/loadavg-" .
|
'loadavg_file' => $ENV{'HOME'} . "/.parallel/tmp/loadavg-" .
|
||||||
$$."-".$string,
|
$$."-".$no_slash_string,
|
||||||
'loadavg' => undef,
|
'loadavg' => undef,
|
||||||
'last_loadavg_update' => 0,
|
'last_loadavg_update' => 0,
|
||||||
'swap_activity_file' => $ENV{'HOME'} . "/.parallel/tmp/swap_activity-" .
|
'swap_activity_file' => $ENV{'HOME'} . "/.parallel/tmp/swap_activity-" .
|
||||||
$$."-".$string,
|
$$."-".$no_slash_string,
|
||||||
'swap_activity' => undef,
|
'swap_activity' => undef,
|
||||||
}, ref($class) || $class;
|
}, ref($class) || $class;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,4 +35,10 @@ echo "### bug #36660: --workdir mkdir does not use --sshlogin custom ssh"
|
||||||
export -f ssh;
|
export -f ssh;
|
||||||
parallel --workdir /tmp/foo/bar --transfer --sshlogin '/usr/bin/ssh localhost' cat ::: parallel_test.txt;
|
parallel --workdir /tmp/foo/bar --transfer --sshlogin '/usr/bin/ssh localhost' cat ::: parallel_test.txt;
|
||||||
|
|
||||||
|
echo "bug #36657: --load does not work with custom ssh"
|
||||||
|
cd /tmp; echo OK > parallel_test.txt;
|
||||||
|
ssh () { echo Failed; };
|
||||||
|
export -f ssh;
|
||||||
|
parallel --load=1000% -S "/usr/bin/ssh localhost" echo ::: OK
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -86,3 +86,5 @@ Chars per line (817788/7): 116826
|
||||||
OK
|
OK
|
||||||
### bug #36660: --workdir mkdir does not use --sshlogin custom ssh
|
### bug #36660: --workdir mkdir does not use --sshlogin custom ssh
|
||||||
OK
|
OK
|
||||||
|
bug #36657: --load does not work with custom ssh
|
||||||
|
OK
|
||||||
|
|
Loading…
Reference in a new issue