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

Re: [MacPerl] file-locking algorithm



> }Question: does the Perl command "open" die whenever a file is being used by
> }another acgi on the server machine?
> 
> I haven't verified this by looking in Inside Macintosh, but the way my Mac
> programs behave leads me to believe that only one Macintosh program at a
> time can hold any file open for writing.  However, others can hold the same
> file open for reading at the same time, and I haven't tested to see what
> happens in MacPerl with open.  Time to do some testing, I think.  The open
> certainly wouldn't fail if you ask for read permission only.

I believe that multiple programs can have the same file open for writing,
as long as they promise only to modify certain portions of the file.  This
is a more sophisticated feature of the MacOS file manager.  I think that
an app can ask that it has exclusive read rights on a file as well...
 
-David
dtm@waterw.com


***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch