diff --git a/src/parallel b/src/parallel index 424013fc..9200bbb5 100755 --- a/src/parallel +++ b/src/parallel @@ -392,7 +392,7 @@ sub spreadstdin { if(not $anything_written and not eof($in)) { # Nothing was written - maybe the block size < record size? # Increase blocksize exponentially - $blocksize = ceil($blocksize * 1.3); + $blocksize = ceil($blocksize * 1.3 + 1); ::warning("A full record was not matched in a block. Increasing to --blocksize ".$blocksize."\n"); } } @@ -4248,13 +4248,24 @@ sub print { my $self = shift; ::debug(">>joboutput ".$self->replaced()."\n"); + if($opt::pipe and $self->virgin()) { + # Nothing was printed to this job: + # cleanup tmp files if --files was set + unlink $self->{'stdoutfilename'}; + return; + } + if($opt::dryrun) { + # Nothing was printed to this job: + # cleanup tmp files if --files was set + unlink $self->{'stdoutfilename'}; + } # Only relevant for grouping $Global::grouped or return; my $out = $self->stdout(); my $err = $self->stderr(); my $command = $self->sshlogin_wrap(); - if($Global::joblog and not ($opt::pipe and $self->virgin())) { + if($Global::joblog and not $opt::pipe) { my $cmd; if($Global::verbose <= 1) { $cmd = $self->replaced();