Fixed bug #52207: Exit status 0 when child job is killed, even with "now,fail=1"

This commit is contained in:
Ole Tange 2018-01-06 19:58:01 +01:00
parent bf24d5e4db
commit a048f547eb
10 changed files with 289 additions and 35 deletions

View file

@ -9104,12 +9104,17 @@ sub set_exitsignal {
} elsif($Global::halt_count) { } elsif($Global::halt_count) {
# --halt now,fail=X or soon,fail=X # --halt now,fail=X or soon,fail=X
# --halt now,done=X or soon,done=X # --halt now,done=X or soon,done=X
$Global::halt_exitstatus = ::min($Global::total_failed,101); $Global::halt_exitstatus =
::min($Global::total_failed,101);
} }
if($Global::halt_count and $Global::halt_count == 1) { if($Global::halt_count and $Global::halt_count == 1) {
# --halt now,fail=1 or soon,fail=1 # --halt now,fail=1 or soon,fail=1
# --halt now,done=1 or soon,done=1 # --halt now,done=1 or soon,done=1
$Global::halt_exitstatus = $job->exitstatus(); # Emulate Bash's +128 if there is a signal
$Global::halt_exitstatus =
($job->exitstatus()
or
$job->exitsignal() ? $job->exitsignal() + 128 : 0);
} }
} }
::debug("halt","Pct: ",$Global::halt_pct, ::debug("halt","Pct: ",$Global::halt_pct,

View file

@ -841,8 +841,8 @@ par_pipe_tag_v() {
par_dryrun_append_joblog() { par_dryrun_append_joblog() {
echo '--dry-run should not append to joblog' echo '--dry-run should not append to joblog'
rm -f /tmp/jl.$$ rm -f /tmp/jl.$$
parallel --jl /tmp/jl.$$ echo ::: 1 2 3 parallel -k --jl /tmp/jl.$$ echo ::: 1 2 3
parallel --dryrun --jl +/tmp/jl.$$ echo ::: 1 2 3 4 parallel --dryrun -k --jl +/tmp/jl.$$ echo ::: 1 2 3 4
# Job 4 should not show up: 3 lines + header = 4 # Job 4 should not show up: 3 lines + header = 4
wc -l < /tmp/jl.$$ wc -l < /tmp/jl.$$
} }

View file

@ -10,6 +10,48 @@ export TMP5G
rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par} rm -f /tmp/*.{tmx,pac,arg,all,log,swp,loa,ssh,df,pip,tmb,chr,tms,par}
par_exit_code() {
echo 'bug #52207: Exit status 0 when child job is killed, even with "now,fail=1"'
in_shell_run_command() {
# Runs command in given shell via Perl's open3
shell="$1"
prg="$2"
perl -MIPC::Open3 -e 'open3($a,$b,$c,"'$shell'","-c","'"$prg"'"); wait; print $?>>8,"\n"'
}
export -f in_shell_run_command
runit() {
OK="ash bash csh dash fish mksh posh rc sash sh static-sh tcsh"
BAD="fdsh fizsh ksh ksh93 yash zsh"
s=100
cp /bin/sleep /tmp/mysleep
echo '# Ideally the command should return the same'
echo '# with or without parallel'
parallel -kj500% --argsep ,, --tag in_shell_run_command {1} '{=2 $_=Q($_) =}' \
,, $OK $BAD ,, \
'/tmp/mysleep '$s \
'parallel --halt-on-error now,fail=1 /tmp/mysleep ::: '$s \
'parallel --halt-on-error now,done=1 /tmp/mysleep ::: '$s \
'parallel --halt-on-error now,done=1 true ::: '$s \
'parallel --halt-on-error now,done=1 exit ::: '$s \
'true;/tmp/mysleep '$s \
'parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: '$s \
'parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: '$s \
'parallel --halt-on-error now,done=1 "true;true" ::: '$s \
'parallel --halt-on-error now,done=1 "true;exit" ::: '$s
}
export -f runit
killsleep() {
sleep 5
while true; do killall -9 mysleep 2>/dev/null; sleep 1; done
}
export -f killsleep
parallel -uj0 --halt now,done=1 ::: runit killsleep
}
par_retries_unreachable() { par_retries_unreachable() {
echo '### Test of --retries on unreachable host' echo '### Test of --retries on unreachable host'
seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo seq 2 | stdout parallel -k --retries 2 -v -S 4.3.2.1,: echo

View file

@ -4,6 +4,37 @@
# Each should be taking 10-30s and be possible to run in parallel # Each should be taking 10-30s and be possible to run in parallel
# I.e.: No race conditions, no logins # I.e.: No race conditions, no logins
par_line_buffer() {
echo "### --line-buffer"
tmp1=$(tempfile)
tmp2=$(tempfile)
seq 10 | parallel -j20 --line-buffer 'seq {} 10 | pv -qL 10' > $tmp1
seq 10 | parallel -j20 'seq {} 10 | pv -qL 10' > $tmp2
cat $tmp1 | wc
diff $tmp1 $tmp2 >/dev/null
echo These must diff: $?
rm $tmp1 $tmp2
}
par_pipe_line_buffer() {
echo "### --pipe --line-buffer"
tmp1=$(tempfile)
tmp2=$(tempfile)
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > $tmp1
seq 200| parallel -N10 -L1 --pipe -j20 --tagstring {#} pv -qL 10 > $tmp2
cat $tmp1 | wc
diff $tmp1 $tmp2 >/dev/null
echo These must diff: $?
rm $tmp1 $tmp2
}
par_pipe_line_buffer_compress() {
echo "### --pipe --line-buffer --compress"
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc
}
par__pipepart_spawn() { par__pipepart_spawn() {
echo '### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922' echo '### bug #46214: Using --pipepart doesnt spawn multiple jobs in version 20150922'
seq 1000000 > /tmp/num1000000; seq 1000000 > /tmp/num1000000;
@ -49,7 +80,7 @@ par__memleak() {
par_slow_total_jobs() { par_slow_total_jobs() {
echo 'bug #51006: Slow total_jobs() eats job' echo 'bug #51006: Slow total_jobs() eats job'
(echo a; sleep 10; echo b; sleep 10; seq 2) | (echo a; sleep 15; echo b; sleep 15; seq 2) |
parallel -k echo '{=total_jobs()=}' parallel -k echo '{=total_jobs()=}'
} }
@ -95,7 +126,8 @@ par_k() {
ulimit -n 50 ulimit -n 50
(echo "sleep 3; echo begin"; seq 1 30 | (echo "sleep 3; echo begin"; seq 1 30 |
parallel -kq echo "sleep 1; echo {}"; parallel -kq echo "sleep 1; echo {}";
echo "echo end") | stdout nice parallel -k -j0 echo "echo end") | stdout nice parallel -k -j0 |
grep -Ev 'No more file handles.|Raising ulimit -n'
} }
par_k_linebuffer() { par_k_linebuffer() {
@ -157,7 +189,7 @@ par_results_compress() {
par_kill_children_timeout() { par_kill_children_timeout() {
echo '### Test killing children with --timeout and exit value (failed if timed out)' echo '### Test killing children with --timeout and exit value (failed if timed out)'
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc; pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc
doit() { doit() {
for i in `seq 100 120`; do for i in `seq 100 120`; do
bash -c "(sleep $i)" & bash -c "(sleep $i)" &
@ -167,7 +199,7 @@ par_kill_children_timeout() {
echo No good; echo No good;
} }
export -f doit export -f doit
parallel --timeout 3 doit ::: 1000000000 1000000001; parallel --timeout 3 doit ::: 1000000000 1000000001
echo $?; echo $?;
sleep 2; sleep 2;
pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc pstree $$ | grep sleep | grep -v anacron | grep -v screensave | wc

View file

@ -71,8 +71,8 @@ linebuffer_matters() {
# with lines starting with the same string # with lines starting with the same string
id=$1 id=$1
shuf $randomfile | perl -pe 's/^/'$id' /' shuf $randomfile | perl -pe 's/^/'$id' /'
# Sleep 3 sec to give time to linebuffer-print the first part # Sleep to give time to linebuffer-print the first part
sleep 3 sleep 10
shuf $randomfile | perl -pe 's/^/'$id' /' shuf $randomfile | perl -pe 's/^/'$id' /'
echo echo
} }
@ -83,9 +83,10 @@ linebuffer_matters() {
perl -ne '/^(\d+)\s/ and print "$1\n"' | uniq | sort perl -ne '/^(\d+)\s/ and print "$1\n"' | uniq | sort
} }
testfunc > $nolbfile & # These can run in parallel if there are enough ressources
testfunc > $controlfile & testfunc > $nolbfile
testfunc --linebuffer > $lbfile & testfunc > $controlfile
testfunc --linebuffer > $lbfile
wait wait
nolb="$(cat $nolbfile)" nolb="$(cat $nolbfile)"

View file

@ -1,25 +1,6 @@
#!/bin/bash #!/bin/bash
cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1 cat <<'EOF' | sed -e 's/;$/; /;s/$SERVER1/'$SERVER1'/;s/$SERVER2/'$SERVER2'/' | stdout parallel -vj0 -k --joblog /tmp/jl-`basename $0` -L1
echo "### --line-buffer"
seq 10 | parallel -j20 --line-buffer 'seq {} 10 | pv -qL 10' > /tmp/parallel_l$$;
seq 10 | parallel -j20 'seq {} 10 | pv -qL 10' > /tmp/parallel_$$;
cat /tmp/parallel_l$$ | wc;
diff /tmp/parallel_$$ /tmp/parallel_l$$ >/dev/null ;
echo These must diff: $?;
rm /tmp/parallel_l$$ /tmp/parallel_$$
echo "### --pipe --line-buffer"
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --tagstring {#} pv -qL 10 > /tmp/parallel_pl$$;
seq 200| parallel -N10 -L1 --pipe -j20 --tagstring {#} pv -qL 10 > /tmp/parallel_p$$;
cat /tmp/parallel_pl$$ | wc;
diff /tmp/parallel_p$$ /tmp/parallel_pl$$ >/dev/null ;
echo These must diff: $?;
rm /tmp/parallel_pl$$ /tmp/parallel_p$$
echo "### --pipe --line-buffer --compress"
seq 200| parallel -N10 -L1 --pipe -j20 --line-buffer --compress --tagstring {#} pv -qL 10 | wc
echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations" echo "### bug #41482: --pipe --compress blocks at different -j/seq combinations"
seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat; seq 1 | parallel -k -j2 --compress -N1 -L1 --pipe cat;
echo echo 1-4 + 1-4 echo echo 1-4 + 1-4

View file

@ -35,8 +35,9 @@ par_load_blocks() {
par_load_from_PARALLEL() { par_load_from_PARALLEL() {
echo "### Test reading load from PARALLEL" echo "### Test reading load from PARALLEL"
# Ignore stderr due to 'Starting processes took > 2 sec'
seq 1 1000000 | seq 1 1000000 |
parallel -kj200 --recend "\n" --spreadstdin gzip -1 | parallel -kj200 --recend "\n" --spreadstdin gzip -1 2>/dev/null |
zcat | sort -n | md5sum zcat | sort -n | md5sum
seq 1 1000000 | seq 1 1000000 |
parallel -kj20 --recend "\n" --spreadstdin gzip -1 | parallel -kj20 --recend "\n" --spreadstdin gzip -1 |

View file

@ -1,3 +1,189 @@
par_exit_code par_exit_code 2>&1
par_exit_code bug #52207: Exit status 0 when child job is killed, even with "now,fail=1"
par_exit_code # Ideally the command should return the same
par_exit_code # with or without parallel
par_exit_code ash /tmp/mysleep 100 137
par_exit_code ash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code ash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code ash parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code ash parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code ash true;/tmp/mysleep 100 137
par_exit_code ash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ash parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code ash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code bash /tmp/mysleep 100 0
par_exit_code bash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code bash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code bash parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code bash parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code bash true;/tmp/mysleep 100 137
par_exit_code bash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code bash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code bash parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code bash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code csh /tmp/mysleep 100 137
par_exit_code csh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code csh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code csh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code csh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code csh true;/tmp/mysleep 100 137
par_exit_code csh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code csh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code csh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code csh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code dash /tmp/mysleep 100 137
par_exit_code dash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code dash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code dash parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code dash parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code dash true;/tmp/mysleep 100 137
par_exit_code dash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code dash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code dash parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code dash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code fish /tmp/mysleep 100 137
par_exit_code fish parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code fish parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code fish parallel --halt-on-error now,done=1 true ::: 100 1
par_exit_code fish parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code fish true;/tmp/mysleep 100 137
par_exit_code fish parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code fish parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code fish parallel --halt-on-error now,done=1 "true;true" ::: 100 1
par_exit_code fish parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code mksh /tmp/mysleep 100 0
par_exit_code mksh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code mksh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code mksh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code mksh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code mksh true;/tmp/mysleep 100 137
par_exit_code mksh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code mksh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code mksh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code mksh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code posh /tmp/mysleep 100 137
par_exit_code posh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code posh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code posh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code posh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code posh true;/tmp/mysleep 100 137
par_exit_code posh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code posh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code posh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code posh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code rc /tmp/mysleep 100 1
par_exit_code rc parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 true ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 exit ::: 100 1
par_exit_code rc true;/tmp/mysleep 100 1
par_exit_code rc parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 "true;true" ::: 100 1
par_exit_code rc parallel --halt-on-error now,done=1 "true;exit" ::: 100 1
par_exit_code sash /tmp/mysleep 100 255
par_exit_code sash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 255
par_exit_code sash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 255
par_exit_code sash parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code sash parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code sash true;/tmp/mysleep 100 0
par_exit_code sash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 0
par_exit_code sash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 0
par_exit_code sash parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code sash parallel --halt-on-error now,done=1 "true;exit" ::: 100 0
par_exit_code sh /tmp/mysleep 100 137
par_exit_code sh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code sh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code sh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code sh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code sh true;/tmp/mysleep 100 137
par_exit_code sh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code sh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code sh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code sh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code static-sh /tmp/mysleep 100 137
par_exit_code static-sh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code static-sh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code static-sh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code static-sh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code static-sh true;/tmp/mysleep 100 137
par_exit_code static-sh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code static-sh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code static-sh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code static-sh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code tcsh /tmp/mysleep 100 137
par_exit_code tcsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code tcsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code tcsh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code tcsh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code tcsh true;/tmp/mysleep 100 137
par_exit_code tcsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code tcsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code tcsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code tcsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code fdsh /tmp/mysleep 100 137
par_exit_code fdsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 2
par_exit_code fdsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 2
par_exit_code fdsh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code fdsh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code fdsh true;/tmp/mysleep 100 137
par_exit_code fdsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 2
par_exit_code fdsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 2
par_exit_code fdsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code fdsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code fizsh /tmp/mysleep 100 137
par_exit_code fizsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code fizsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code fizsh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code fizsh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code fizsh true;/tmp/mysleep 100 137
par_exit_code fizsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code fizsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code fizsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code fizsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code ksh /tmp/mysleep 100 0
par_exit_code ksh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code ksh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code ksh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code ksh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code ksh true;/tmp/mysleep 100 0
par_exit_code ksh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ksh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ksh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code ksh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code ksh93 /tmp/mysleep 100 0
par_exit_code ksh93 parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code ksh93 parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code ksh93 parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code ksh93 parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code ksh93 true;/tmp/mysleep 100 0
par_exit_code ksh93 parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code ksh93 parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code yash /tmp/mysleep 100 0
par_exit_code yash parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code yash parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code yash parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code yash parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code yash true;/tmp/mysleep 100 0
par_exit_code yash parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code yash parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code yash parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code yash parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code zsh /tmp/mysleep 100 0
par_exit_code zsh parallel --halt-on-error now,fail=1 /tmp/mysleep ::: 100 137
par_exit_code zsh parallel --halt-on-error now,done=1 /tmp/mysleep ::: 100 137
par_exit_code zsh parallel --halt-on-error now,done=1 true ::: 100 0
par_exit_code zsh parallel --halt-on-error now,done=1 exit ::: 100 100
par_exit_code zsh true;/tmp/mysleep 100 0
par_exit_code zsh parallel --halt-on-error now,fail=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code zsh parallel --halt-on-error now,done=1 "true;/tmp/mysleep" ::: 100 137
par_exit_code zsh parallel --halt-on-error now,done=1 "true;true" ::: 100 0
par_exit_code zsh parallel --halt-on-error now,done=1 "true;exit" ::: 100 100
par_exit_code parallel: This job finished:
par_exit_code runit
par_halt_on_error par_halt_on_error 2>&1 par_halt_on_error par_halt_on_error 2>&1
par_halt_on_error -2 true true 0 par_halt_on_error -2 true true 0
par_halt_on_error -2 true true 0 par_halt_on_error -2 true true 0

View file

@ -31,8 +31,6 @@ par_k parallel: Warning: Only enough file handles to run 9 jobs in parallel.
par_k parallel: Warning: Running 'parallel -j0 -N 9 --pipe parallel -j0' or par_k parallel: Warning: Running 'parallel -j0 -N 9 --pipe parallel -j0' or
par_k parallel: Warning: raising 'ulimit -n' or 'nofile' in /etc/security/limits.conf par_k parallel: Warning: raising 'ulimit -n' or 'nofile' in /etc/security/limits.conf
par_k parallel: Warning: or /proc/sys/fs/file-max may help. par_k parallel: Warning: or /proc/sys/fs/file-max may help.
par_k parallel: Warning: No more file handles.
par_k parallel: Warning: Raising ulimit -n or /etc/security/limits.conf may help.
par_k begin par_k begin
par_k 1 par_k 1
par_k 2 par_k 2
@ -238,6 +236,9 @@ par_kill_children_timeout ### Test killing children with --timeout and exit valu
par_kill_children_timeout 0 0 0 par_kill_children_timeout 0 0 0
par_kill_children_timeout 2 par_kill_children_timeout 2
par_kill_children_timeout 0 0 0 par_kill_children_timeout 0 0 0
par_line_buffer ### --line-buffer
par_line_buffer 55 55 120
par_line_buffer These must diff: 1
par_linebuffer_tag_slow_output Test output tag with mixing halflines par_linebuffer_tag_slow_output Test output tag with mixing halflines
par_linebuffer_tag_slow_output localhost par_linebuffer_tag_slow_output localhost
par_linebuffer_tag_slow_output localhost par_linebuffer_tag_slow_output localhost
@ -263,6 +264,11 @@ par_maxlinelen_X_I Chars per line (817788/7): 116826
par_maxlinelen_m_I ### Test max line length -m -I par_maxlinelen_m_I ### Test max line length -m -I
par_maxlinelen_m_I c78bd0799bc23d8946732f8b3ae3c94e - par_maxlinelen_m_I c78bd0799bc23d8946732f8b3ae3c94e -
par_maxlinelen_m_I Chars per line (697800/6): 116300 par_maxlinelen_m_I Chars per line (697800/6): 116300
par_pipe_line_buffer ### --pipe --line-buffer
par_pipe_line_buffer 200 400 1202
par_pipe_line_buffer These must diff: 1
par_pipe_line_buffer_compress ### --pipe --line-buffer --compress
par_pipe_line_buffer_compress 200 400 1202
par_plus_dyn_repl Dynamic replacement strings defined by --plus par_plus_dyn_repl Dynamic replacement strings defined by --plus
par_plus_dyn_repl myval par_plus_dyn_repl myval
par_plus_dyn_repl myval par_plus_dyn_repl myval