mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-27 00:17:54 +00:00
parallel: Unlink should not happen with --files.
This commit is contained in:
parent
592a6482a8
commit
05e1cf9ef4
|
@ -3850,10 +3850,11 @@ sub start {
|
||||||
my ($outfh,$errfh,$name);
|
my ($outfh,$errfh,$name);
|
||||||
# To group we create temporary files for STDOUT and STDERR
|
# To group we create temporary files for STDOUT and STDERR
|
||||||
# To avoid the cleanup unlink the files immediately (but keep them open)
|
# To avoid the cleanup unlink the files immediately (but keep them open)
|
||||||
($outfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => 1);
|
my $unlink = $opt::files ? 0 : 1;
|
||||||
|
($outfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => $unlink);
|
||||||
$job->set_stdoutfilename($name);
|
$job->set_stdoutfilename($name);
|
||||||
$opt::files or unlink $name;
|
$unlink and unlink $name;
|
||||||
($errfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => 1);
|
($errfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => $unlink);
|
||||||
unlink $name;
|
unlink $name;
|
||||||
|
|
||||||
open OUT, '>&', $outfh or ::die_bug("Can't redirect STDOUT: $!");
|
open OUT, '>&', $outfh or ::die_bug("Can't redirect STDOUT: $!");
|
||||||
|
|
Loading…
Reference in a new issue