mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-12-23 05:07: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);
|
||||
# To group we create temporary files for STDOUT and STDERR
|
||||
# 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);
|
||||
$opt::files or unlink $name;
|
||||
($errfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => 1);
|
||||
$unlink and unlink $name;
|
||||
($errfh, $name) = ::tempfile(SUFFIX => ".par", UNLINK => $unlink);
|
||||
unlink $name;
|
||||
|
||||
open OUT, '>&', $outfh or ::die_bug("Can't redirect STDOUT: $!");
|
||||
|
|
Loading…
Reference in a new issue