[Ecls-list] (compile) leaks zero-length temporary files

Josh Elsasser josh at elsasser.org
Sun Sep 14 00:26:06 UTC 2008


COMPILE calls mkstemp twice, and forgets about the first call when it
comes time to delete temporary files.  I'm not sure why, perhaps it
was debugging code that snuck in with the WITH-COMPILATION-UNIT
changes last month?  Whatever the cause, the following patch fixes it
for me.

Oh, and before I forget again, is there any reason that ecl defaults
to putting temporary files in the current directory instead of /tmp?

--- src/cmp/cmpmain.lsp
+++ src/cmp/cmpmain.lsp
@@ -662,8 +662,6 @@ the environment variable TMPDIR to a different value." template)
       (return-from compile (values nil t t))))
 
   (let*((*load-time-values* 'values) ;; Only the value is kept
-	(template (format nil "TMP:ECL~3,'0x" (incf *gazonk-counter*)))
-	(data-pathname (or (si::mkstemp template) "foo"))
 	(c-pathname (compile-file-pathname data-pathname :type :c))
 	(h-pathname (compile-file-pathname data-pathname :type :h))
 	(o-pathname (compile-file-pathname data-pathname :type :object))




More information about the ecl-devel mailing list