Iwao KIMURA on Thu, 31 Dec 1998 16:16:12 +0900


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

gphelp leaks temporaly file.


Hi all.

Gphelp for 2.0.13.alpha leaks temporally file if the requested word is
not found and -detex is NOT set. The following patch fix this problem
(and contains some aesthetic modification):

-----------------------------
--- doc/gphelp.in.org	Sun Dec 20 03:04:51 1998
+++ doc/gphelp.in	Sun Dec 20 03:07:34 1998
@@ -35,7 +35,11 @@
 
 &pretex() if (!$detex);
 for (@ARGV) { &treat($_); }
-if (!$found) { exit 0; }
+if (!$found)
+{
+	&clean if (!$detex);
+	exit 0;
+}
 &posttex() if (!$detex);
 
 print $gpmsg if (!$detex && $fromgp);
@@ -160,10 +164,9 @@
   print TEX "\\vfill\\eject\\bye"; close(TEX);
 
   chdir($tmpdir);
-  `tex $texfile.tex 2>/dev/null > /dev/null`;
-  die "could not process $texfile.dvi" if (! -f "$texfile.dvi");
+  system("tex $texfile.tex 2>/dev/null > /dev/null") == 0 || die "could not process $texfile.dvi" if (! -f "$texfile.dvi");
 
-  system("($xdvi $texfile.dvi; rm -f $texfile.tex $texfile.dvi $texfile.log)&");
+  system("($xdvi $texfile.dvi 2>/dev/null >/dev/null; rm -f $texfile.tex $texfile.dvi $texfile.log)&");
   &handler(1);
 }
 

--------------------

Wish you all have a good new year.

;#			     Iwao KIMURA			;#
;#		      Institute of Mathematics,			;#
;#		University of TSUKUBA, IBARAKI, JAPAN.		;#