[tex-k] tex/pdftex -recorder works incorrectly on parrallel TeX runs (race, breaks make -j)

Reinhard Kotucha reinhard.kotucha at web.de
Mon Mar 29 02:47:47 CEST 2010


On 28 March 2010 Karl Berry wrote:

 >     > but I wonder, why use intermediate file for recorder at all?
 >     > Why not to open $(jobname).fls in the first place?
 > 
 > Don't want to overwrite the file from a previous run, I suppose.

Certainly a bad idea.  People expect that it provides information
about the last run, even if the program crashed.

Whenever you invoke TeX, one of the first thing it does is to open the
.log file and overwrites the one from a previous run, and I think that
this behaviour is correct and a .fls file from a previous run should
be deleted/overwritten too.  If \jobname can't be determined before
the .fls file has to be opened, a temporary file is needed and your
proposal to add the PID to the file name is reasonable.

However, PIDs are assigned differently on Unix and Windows.  I can't
overlook all the implications, but I think I should at least mention
the differences.

On Unix the PID is incremented whenever a new process is created.

On Windows a PID is released when a process is finished and is
assigned to the process started next.  Suppose that you have a batch
file starting two processes:

--------------
tex foo  
tex bar  
--------------

If there are no processes running in the background, they both get
the same PID.  

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the tex-k mailing list