[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#668779: Processed: [patch] Re: /usr/bin/latex2man: latex2man: predictable /tmp filenames



On Wed, 13 Feb 2013 12:50:11 +0900
Norbert Preining <preining@logic.at> wrote:
> thanks for the patch, but .... PLEASE don't use
> 	bugnumber-submitter@...
> as *we* the maintainers (debian-tex-maint) do NOT see the emails!!!

 Okay, sorry for inconvenience.
 and Tatsuya also sent reviced patch, did you see it?
 
diff --git a/texmf-dist/scripts/latex2man/latex2man b/texmf-dist/scripts/latex2man/latex2man
index 5987a8c..2750638 100644
--- a/texmf-dist/scripts/latex2man/latex2man
+++ b/texmf-dist/scripts/latex2man/latex2man
@@ -29,8 +29,6 @@ sub date2str;
 $VERSION = "1.24";
 $DATE    = date2str ('$Date: 2010/12/22 12:44:30 $' =~ m|(\d+/\d+/\d+)|);
 
-$tmp = "/tmp/$CMD.$$";
-
 ##################################################################
 # check option and arguments
 ##################################################################
@@ -124,6 +122,8 @@ $SrcFile  = $ARGV[0];
 $DestFile = $ARGV[1];
 open (SRC,  "<$SrcFile")  || die "$CMD: Can't open file \`$SrcFile' for reading.\n";
 if ($opt_H || $opt_T) {
+    $tmp = `mktemp` || die;
+    chomp $tmp;
     # DestFile will be written in the postprocess
     open (DEST, ">$tmp")      || die "$CMD: Can't open file \`$tmp' for writing.\n";
 } else {


Reply to: