Recent versions of GNU Parallel have focused on this particular problem. Kill the running children if one of them fails:
parallel --halt now,fail=1 'echo {};{}' ::: true false true true false
Kill the running children if one succeeds:
parallel --halt now,success=1 'echo {};{}' ::: true false true true false
Kill working children if they failed to complete 20%:
parallel -j1 --halt now,fail=20% 'echo {#} {};{}' ::: true true true false true true false true false true
Kill a child with the TERM, TERM, TERM, KILL signals, waiting for 50 ms between each signal:
parallel --termseq TERM,50,TERM,50,TERM,50,KILL -u --halt now,fail=1 'trap "echo TERM" SIGTERM; sleep 1;echo {};{}' ::: true false true true false
source share