mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-29 17:37:55 +00:00
43 lines
2.8 KiB
Plaintext
43 lines
2.8 KiB
Plaintext
echo '### bug #42089: --results with arg > 256 chars (should be 1 char shorter)'
|
|
### bug #42089: --results with arg > 256 chars (should be 1 char shorter)
|
|
parallel --results parallel_test_dir echo ::: 1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456; ls parallel_test_dir/1/
|
|
1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
|
|
123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345
|
|
rm -rf parallel_test_dir
|
|
echo '**'
|
|
**
|
|
echo '### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834'; seq 1 3 | parallel -j1 "sleep 2; echo {}" | parallel -kj2 echo
|
|
### Test slow arguments generation - https://savannah.gnu.org/bugs/?32834
|
|
1
|
|
2
|
|
3
|
|
echo '**'
|
|
**
|
|
echo '### Are children killed if GNU Parallel receives TERM twice? There should be no sleep at the end'
|
|
### Are children killed if GNU Parallel receives TERM twice? There should be no sleep at the end
|
|
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 5; pstree $$; kill -TERM $T; sleep 1; pstree $$; kill -TERM $T; sleep 1; pstree $$; echo '**'
|
|
bash-+-perl---bash---sleep
|
|
`-pstree
|
|
bash-+-perl---bash---sleep
|
|
`-pstree
|
|
bash---pstree
|
|
**
|
|
parallel: SIGTERM received. No new jobs will be started.
|
|
parallel: Waiting for these 1 jobs to finish. Send SIGTERM again to stop now.
|
|
parallel: bash -c sleep\ 120\ \&\ pid\=\$\!\;\ wait\ \$pid 1
|
|
echo '### Are children killed if GNU Parallel receives INT twice? There should be no sleep at the end'
|
|
### Are children killed if GNU Parallel receives INT twice? There should be no sleep at the end
|
|
parallel -q bash -c 'sleep 120 & pid=$!; wait $pid' ::: 1 & T=$!; sleep 5; pstree $$; kill -INT $T; sleep 1; pstree $$; echo '**'
|
|
bash-+-perl---bash---sleep
|
|
`-pstree
|
|
bash---pstree
|
|
**
|
|
echo '### Do children receive --termseq signals'
|
|
### Do children receive --termseq signals
|
|
show_signals() { perl -e 'for(keys %SIG) { $SIG{$_} = eval "sub { print STDERR \"Got $_\\n\"; }";} while(1){sleep 1}'; }; export -f show_signals; echo | stdout parallel --termseq TERM,200,TERM,100,TERM,50,KILL,25 -u --timeout 1 show_signals; echo | stdout parallel --termseq INT,200,TERM,100,KILL,25 -u --timeout 1 show_signals; sleep 3;
|
|
Got TERM
|
|
Got TERM
|
|
Got TERM
|
|
Got INT
|
|
Got TERM
|