about summary refs log tree commit homepage
path: root/lib/PublicInbox/ViewVCS.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-09-12 08:34:20 +0000
committerEric Wong <e@80x24.org>2019-09-14 09:24:23 +0000
commite5631087d3862823d0d4854a8dfc1258f91cb115 (patch)
treecbb6b7bf2c117fc8550f20c12116582933351131 /lib/PublicInbox/ViewVCS.pm
parentbb20bc29a831d8f84613d48af729ffaede9d43e2 (diff)
downloadpublic-inbox-e5631087d3862823d0d4854a8dfc1258f91cb115.tar.gz
Although we always unlink temporary files, give them a
meaningful name so that we can we can still make sense
of the pre-unlink name when using lsof(8) or similar
tools on Linux.
Diffstat (limited to 'lib/PublicInbox/ViewVCS.pm')
-rw-r--r--lib/PublicInbox/ViewVCS.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm
index 60a62e57..369afe93 100644
--- a/lib/PublicInbox/ViewVCS.pm
+++ b/lib/PublicInbox/ViewVCS.pm
@@ -20,6 +20,7 @@ use bytes (); # only for bytes::length
 use PublicInbox::SolverGit;
 use PublicInbox::WwwStream;
 use PublicInbox::Linkify;
+use PublicInbox::Tmpfile;
 use PublicInbox::Hval qw(ascii_html to_filename);
 my $hl = eval {
         require PublicInbox::HlMod;
@@ -185,7 +186,7 @@ sub show ($$;$) {
                 $hints->{$to} = $v;
         }
 
-        open my $log, '+>', undef or die "open: $!";
+        my $log = tmpfile("solve.$oid_b");
         my $solver = PublicInbox::SolverGit->new($ctx->{-inbox}, sub {
                 solve_result($ctx, $_[0], $log, $hints, $fn);
         });