mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 22:17:54 +00:00
parallel: --wd and --halt fix.
This commit is contained in:
parent
3d2ecc7651
commit
8966df3c0d
18
src/parallel
18
src/parallel
|
@ -2825,13 +2825,14 @@ 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 == 2 and $job->exitstatus())
|
($opt::halt and
|
||||||
or
|
(($opt::halt == 2 and $job->exitstatus())
|
||||||
($opt::halt == -2 and not $job->exitstatus()));
|
or
|
||||||
if($opt::keeporder and not $print_now) {
|
($opt::halt == -2 and not $job->exitstatus())));
|
||||||
$job->print_earlier_jobs();
|
if($opt::keeporder and not $print_now) {
|
||||||
} else {
|
$job->print_earlier_jobs();
|
||||||
|
} else {
|
||||||
$job->print();
|
$job->print();
|
||||||
}
|
}
|
||||||
$job->should_we_halt();
|
$job->should_we_halt();
|
||||||
|
@ -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