[NTG-pdftex] [pdftex-Bugs][1242] pdftex opens the .pdf output file with write sharing access

pdftex-bugs at sarovar.org pdftex-bugs at sarovar.org
Fri Jun 6 14:53:58 CEST 2008


Bugs item #1242, was opened at 2008-06-06 13:53
Status: Open
Priority: 3
Submitted By: William Blum (wblum)
Assigned to: Nobody (None)
Summary: pdftex opens the .pdf output file with write sharing access 
Resolution: None
Group: None
Category: None


Initial Comment:
pdftex v1.40.7 opens the output .pdf file with write sharing access (at least on the Miktex distribution). This is bad for many reasons (and can actually be an indirect cause of file locking problems in some situations).

This means that you can start two instances of pdftex on the same .tex file without getting any error, the writing operations gets interleaved and you end up with a corrupt .pdf.

pdftex should open the file with read sharing access only. If the file is opened using the C++ fstream::open function then this means setting the protection mode to 'filebuf::sh_read' but not to 'filebuf::sh_write'. That way if another instance is running, it will prevent the new instance from writing into the file.

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

You can respond by visiting: 
http://sarovar.org/tracker/?func=detail&atid=493&aid=1242&group_id=106


More information about the ntg-pdftex mailing list