mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 05:57:54 +00:00
parallel: Fixed https://savannah.gnu.org/bugs/index.php?33352
Passes testsuite.
This commit is contained in:
parent
10ac95d29a
commit
59ddc7b75d
|
@ -121,6 +121,7 @@ sub spreadstdin {
|
|||
|
||||
while(read(STDIN,substr($buf,length $buf,0),$::opt_blocksize)) {
|
||||
# substr above = append to $buf
|
||||
reap_if_needed(); # Re-enable reaping after read() (Bug#33352)
|
||||
if($::opt_regexp) {
|
||||
if($Global::max_number_of_args) {
|
||||
# -N => (start..*?end){n}
|
||||
|
@ -160,6 +161,7 @@ sub spreadstdin {
|
|||
}
|
||||
}
|
||||
}
|
||||
do_not_reap(); # Disable reaping before read(STDIN) (Bug#33352)
|
||||
}
|
||||
# If there is anything left in the buffer write it
|
||||
write_record_to_pipe(\$buf,$recstart,$recend);
|
||||
|
|
26
testsuite/tests-to-run/test59.sh
Executable file
26
testsuite/tests-to-run/test59.sh
Executable file
|
@ -0,0 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo '### Test bug https://savannah.gnu.org/bugs/index.php?33352'
|
||||
|
||||
# produce input slowly to parallel so that it will reap a process
|
||||
# while blocking in read()
|
||||
|
||||
MD5=md5sum
|
||||
PAR="parallel -j2 --pipe --keeporder --block 150000 --tmpdir=/dev/shm"
|
||||
perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | md5sum
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR cat | md5sum &
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR --recend '' cat | md5sum &
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR --recend '' --files cat | parallel -Xj1 cat {}';'rm {} | md5sum &
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR --recend '' --files cat | parallel -Xj1 cat {}';'rm {} | md5sum &
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR --recend '' --files --tmpdir /dev/shm cat | parallel -Xj1 cat {}';'rm {} | md5sum &
|
||||
nice nice perl -e '@x=1 .. 17000; for(1..100) { print "@x\n"}' | pv -qL 1000000 | \
|
||||
$PAR --recend '' --files --halt-on-error 2 cat | parallel -Xj1 cat {}';'rm {} | md5sum &
|
||||
wait
|
||||
|
||||
|
||||
|
|
@ -51,8 +51,8 @@ mysql -C --host=localhost --user=sqlunittest --port=3306 --password=CB5A1FFF
|
|||
Test if --debug works
|
||||
Yes it does
|
||||
### Test --version -V
|
||||
7 43 306
|
||||
7 43 306
|
||||
12 74 500
|
||||
12 74 500
|
||||
### Test -r
|
||||
dburl pg://nongood@127.0.0.3:2227/
|
||||
databasedriver pg user nongood password host 127.0.0.3 port 2227 database query
|
||||
|
|
8
testsuite/wanted-results/test59
Normal file
8
testsuite/wanted-results/test59
Normal file
|
@ -0,0 +1,8 @@
|
|||
### Test bug https://savannah.gnu.org/bugs/index.php?33352
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
||||
350eda13a37912d755c9d733d149bdaf -
|
Loading…
Reference in a new issue