[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File locking?



Dave Lerner wrote:
> 
> The scripts lock the data files individually:
> 
> open and lock file #1
> access file #1
> close file #1
> 
> open and lock file #2
> access file #2
> close file #2
> 
> If any of the files are interdependent, this could result in files
> getting corrupted, if multiple users are running the scripts
> concurrently.
I'm not sure of what you mean exactly by interdependent, but I'd guess
they are not. Each time a file is opened for writing, all info that will
be put into it has already been stored in a Perl variable.
But this is an area I don't know very much about; I found "the lock
model" in another script. So if you have some knowledge about it, I'd
appreciate if you could take a closer look. For instance, you could
check the "new site" or "edit site" routine, since sites.db is the file
which would be most difficult to fix if it got corrupted.
/ Gunnar

References to:
"Dave Lerner" <mercury@spamcop.net>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]