[tex-live] Location of recorder file

Karl Berry karl at freefriends.org
Mon May 2 02:56:33 CEST 2011

    This issue is hopefully solved in LuaTeX:
    http://tracker.luatex.org/view.php?id=615 Maybe someone wants to provide
    an analogous patch for the other engines?  

I believe LuaTeX is actually using the common recorder code here,
let's not go backwards by introducing engine-specific changes when there
is no need.  There's already much too much of that.

I changed recorder_change_filename in web2c/lib/openclose.c in the same
way (r22270).

Oh, sigh.  That works for tex and pdftex, but not luatex, when I call
luatex -ini --output-directory=tmp --recorder /home/karl/hello.tex
-- it tries to tmp//home/karl/hello.texPID.fls, which is never going to

Well, more later I guess, I'm out of time for today.


--- openclose.c	(revision 22266)
+++ openclose.c	(working copy)
@@ -67,15 +67,33 @@
-/* Change the name of the recorder file. */
+/* Change the name of the recorder file after we know the log file to
+   the usual thing -- no pid integer and the document file name instead
+   of the program name.  Unfortunately, we have to explicitly take
+   -output-directory into account (again), since the NEW_NAME we are
+   called with does not; it is just the log file name with .log replaced
+   by .fls.  */
 recorder_change_filename (string new_name)
+   string temp = NULL;
    if (!recorder_file)
+   /* If an output directory was specified, use it.  */
+   if (output_directory) {
+     temp = concat3(output_directory, DIR_SEP_STRING, new_name);
+     new_name = temp;
+   }
    rename(recorder_name, new_name);
    recorder_name = xstrdup(new_name);
+   if (temp)
+     free (temp);
 /* helper for recorder_record_* */

More information about the tex-live mailing list