mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 05:07:54 +00:00
Fixed bug #45619: "--halt" erroneous error exit code.
This commit is contained in:
parent
95d75a290f
commit
26606a5501
|
@ -167,7 +167,8 @@ if($opt::halt and $Global::halt_when ne "never") {
|
|||
$Global::halt_exitstatus =
|
||||
::ceil($Global::total_failed / $Global::total_started * 100);
|
||||
} elsif($Global::halt_count) {
|
||||
$Global::halt_exitstatus = ::min($Global::total_failed,101);
|
||||
$Global::halt_exitstatus =
|
||||
::min(undef_as_zero($Global::total_failed),101);
|
||||
}
|
||||
}
|
||||
wait_and_exit($Global::halt_exitstatus);
|
||||
|
|
|
@ -17,6 +17,12 @@ export SMALLDISK
|
|||
) >/dev/null 2>/dev/null
|
||||
|
||||
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
|
||||
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)';
|
||||
seq 10 | parallel --halt now,fail=1 true;
|
||||
echo $?
|
||||
|
||||
echo '**'
|
||||
|
||||
echo '### Test exit val - true';
|
||||
echo true | parallel;
|
||||
echo $?
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
echo '### Test bug #45619: "--halt" erroneous error exit code (should give 0)'; seq 10 | parallel --halt now,fail=1 true; echo $?
|
||||
### Test bug #45619: "--halt" erroneous error exit code (should give 0)
|
||||
0
|
||||
echo '**'
|
||||
**
|
||||
echo '### Test exit val - true'; echo true | parallel; echo $?
|
||||
### Test exit val - true
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue