Marvin T. Pascual said:

>
>> How do you lock a particular file (ex. a spreadsheet file) such that
>> if it is already open, other people will only have read-only access.
>

i think file locking has many forms when it comes to Linux...i'm not the
authority on this topic, but i was able to make my own software work before
such that i opened a file using open() and fcntl-ed it to lock it. so if
another instance of my software was running and trying to open the file for
writing, it would pause (block) until the previous instance close()-d the
file.
-andre



_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

To subscribe to the Linux Newbies' List: send "subscribe" in the body to 
[EMAIL PROTECTED]

Reply via email to