mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-22 14:07:55 +00:00
parallel: bug with --dryrun and virgin jobs.
This commit is contained in:
parent
0706a95802
commit
6e8247d6d1
15
src/parallel
15
src/parallel
|
@ -392,7 +392,7 @@ sub spreadstdin {
|
||||||
if(not $anything_written and not eof($in)) {
|
if(not $anything_written and not eof($in)) {
|
||||||
# Nothing was written - maybe the block size < record size?
|
# Nothing was written - maybe the block size < record size?
|
||||||
# Increase blocksize exponentially
|
# 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");
|
::warning("A full record was not matched in a block. Increasing to --blocksize ".$blocksize."\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4248,13 +4248,24 @@ sub print {
|
||||||
|
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
::debug(">>joboutput ".$self->replaced()."\n");
|
::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
|
# Only relevant for grouping
|
||||||
$Global::grouped or return;
|
$Global::grouped or return;
|
||||||
my $out = $self->stdout();
|
my $out = $self->stdout();
|
||||||
my $err = $self->stderr();
|
my $err = $self->stderr();
|
||||||
my $command = $self->sshlogin_wrap();
|
my $command = $self->sshlogin_wrap();
|
||||||
|
|
||||||
if($Global::joblog and not ($opt::pipe and $self->virgin())) {
|
if($Global::joblog and not $opt::pipe) {
|
||||||
my $cmd;
|
my $cmd;
|
||||||
if($Global::verbose <= 1) {
|
if($Global::verbose <= 1) {
|
||||||
$cmd = $self->replaced();
|
$cmd = $self->replaced();
|
||||||
|
|
Loading…
Reference in a new issue