mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 16:07:54 +00:00
parallel: --wd and --halt fix.
This commit is contained in:
parent
3d2ecc7651
commit
8966df3c0d
|
@ -2825,10 +2825,11 @@ sub reaper {
|
||||||
$Global::timeoutq->update_delta_time($job->runtime());
|
$Global::timeoutq->update_delta_time($job->runtime());
|
||||||
}
|
}
|
||||||
# Force printing now if --halt forces us to exit
|
# Force printing now if --halt forces us to exit
|
||||||
my $print_now = $opt::halt and
|
my $print_now =
|
||||||
|
($opt::halt and
|
||||||
(($opt::halt == 2 and $job->exitstatus())
|
(($opt::halt == 2 and $job->exitstatus())
|
||||||
or
|
or
|
||||||
($opt::halt == -2 and not $job->exitstatus()));
|
($opt::halt == -2 and not $job->exitstatus())));
|
||||||
if($opt::keeporder and not $print_now) {
|
if($opt::keeporder and not $print_now) {
|
||||||
$job->print_earlier_jobs();
|
$job->print_earlier_jobs();
|
||||||
} else {
|
} else {
|
||||||
|
@ -6025,9 +6026,8 @@ sub sshlogin_wrap {
|
||||||
if($opt::workdir) {
|
if($opt::workdir) {
|
||||||
# Create remote workdir if needed. Then cd to it.
|
# Create remote workdir if needed. Then cd to it.
|
||||||
my $wd = $self->workdir();
|
my $wd = $self->workdir();
|
||||||
$pwd = qq{system("mkdir","-p","--","$wd") || chdir "$wd" ||}.
|
$pwd = qq{system("mkdir","-p","--","$wd"); chdir "$wd" ||}.
|
||||||
qq{print(STDERR "parallel: Cannot chdir to $wd\\n") && exit 255;};
|
qq{print(STDERR "parallel: Cannot chdir to $wd\\n") && exit 255;};
|
||||||
$command = "cd $wd;$command";
|
|
||||||
}
|
}
|
||||||
my ($csh_friendly,$envset,$bashfuncset) = env_as_eval();
|
my ($csh_friendly,$envset,$bashfuncset) = env_as_eval();
|
||||||
my $remote_command = $pwd.$envset.$bashfuncset.
|
my $remote_command = $pwd.$envset.$bashfuncset.
|
||||||
|
|
Loading…
Reference in a new issue