[texhax] adobe 10

Reinhard Kotucha reinhard.kotucha at web.de
Sat May 28 18:43:32 CEST 2011


On 2011-05-28 at 15:44:39 +0200, Philipp Stephani wrote:

 > >>> if it is windows, then why doesn't it lock it for Sumatra PDF?
 > >> 
 > >> The Windows kernel locks opened files only if requested by the
 > >> caller (i.e. the application). Files can be opened with or without
 > >> read and/or write locking. See the documentation for the CreateFile
 > >> function for details.
 > > 
 > > The question is: what happens on Windows if a file is _not_ locked and
 > > is replaced by a process (TeX) while another one (AR) is accessing it.
 > > Only removing the lock might not be sufficient, and I suppose it's not
 > > set for fun.
 > 
 > If an application doesn't lock a file for writing, then other
 > processes can open it for writing, so the application has to be
 > prepared for that. But that has nothing to do with Windows.

Of course it has.  AR doesn't lock files on Unix.  You can have a file
opened in AR while TeX is creating a new one.  AR displays the old one
until you explictly reload the file.  Applications don't have to be
prepared for that.  It always works out of the box.  You can even
update your system while it's running.  And under Linux you can even
run AR with a deleted file on an MS-DOG file system:

$ mount | grep media
/dev/sdb1 on /media/usb type vfat (rw,nosuid,nodev,user=reinhard)
$ acroread /media/usb/test.pdf &
[1] 21197
$ lsof /media/usb/
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
acroread 21197 reinhard    8r   REG   8,17  1101250  100 /media/usb/test.pdf
$ rm /media/usb/test.pdf 
$ lsof /media/usb/
COMMAND    PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
acroread 21197 reinhard    8r   REG   8,17  1101250  100 /media/usb/test.pdf (deleted)


Regarding Windows: If you think that Adobe is the culprit, then please
tell them what they are doing wrong.  I assume that they are able to
open a file properly, they do this on other systems too and it works
perfectly there.

I don't know why everybody is blaming Adobe for the file locking mess.

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 texhax mailing list