Eike Rathke wrote: > Hi Mathias, > > On Wednesday, 2007-01-10 11:44:34 +0100, Mathias Bauer wrote: > >> > And IIRC - while the file descriptor is still open, the operating system >> > (or >> > at least Linux) does not unlink the file for the process that owns the >> > file >> > descriptor - but I can be wrong of course. >> That won't help if you try to read something that isn't there anymore >> because the file has been overwritten. The document will quit service. > > This is not the case on Unix systems. The kernel will only free the > chain of inodes used by the file when the last reference is released. As > long as at least one process' file handle or directory entry or hard > link references the "file" it doesn't physically vanish.
My concern isn't that the file is removed, my concern is that the file is changed. My understanding is that the process not doing the changes now sees the changed file if it tries to reload something on demand. But maybe my understanding is wrong - then I wonder how we managed to crash when locking wasn't available. I try to find some old issues and then try to reproduce them with disabled locking. > Which of course doesn't help on other platforms. Right. But IIRC on Windows XP you can't delete a file that is opened by another process even if it isn't locked. The locking is necessary only for managing file modifications. And here we again have the problem I outlined above. Ciao, Mathias -- Mathias Bauer (mba) - Project Lead OpenOffice.org Writer OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't reply to "[EMAIL PROTECTED]". I use it for the OOo lists and only rarely read other mails sent to it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
