Re: File conflict in Windows

From: Roland Kuhn <rkuhn_at_e18.physik.tu-muenchen.de>
Date: Mon, 12 Feb 2007 09:47:18 +0100


Hi Valeri!

On 12 Feb 2007, at 00:12, Fine, Valeri wrote:

>> While the file is open in Root, I cannot delete it using Windows
>> explorer.
>
> Do you think it is unreasonable?
> There are two scenarios
> 1. Either you can not change (delete, write append ...) the file
> that had been open by some program
> or
> 2. You can, but that program should not try to access the file
> anymore or crash.
>
> The average Linux file system doesn't provide such level of the
> protection. I would like to call your attention that this is the
> feature of the Windows file system rather the concrete Windows
> application.
>

I just verified that ROOT v5.14.00b does "access; lstat; unlink; access; open" on the file, which is safe on all Unix-like systems, because the file created by open is independent from the one unlinked before. So, using TFile(..., "RECREATE") is a safe way of writing a new data set, irrespective of the fact whether the file is open in another process or not: the other process(es) will just see the old contents. It is a shame that Windows cannot cope with deleted open files.

Ciao,

                     Roland

--
TU Muenchen, Physik-Department E18, James-Franck-Str., 85748 Garching
Telefon 089/289-12575; Telefax 089/289-12570
--
CERN office: 892-1-D23 phone: +41 22 7676540 mobile: +41 76 487 4482
--
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.  - Benjamin Franklin
-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GS/CS/M/MU d-(++) s:+ a-> C+++ UL++++ P+++ L+++ E(+) W+ !N K- w--- M 
+ !V Y+
PGP++ t+(++) 5 R+ tv-- b+ DI++ e+++>++++ h---- y+++
------END GEEK CODE BLOCK------



  • application/pkcs7-signature attachment: smime.p7s
Received on Mon Feb 12 2007 - 10:17:21 CET

This archive was generated by hypermail 2.2.0 : Mon Feb 12 2007 - 17:50:01 CET