Not so Ubuntu related C question
Michael R Head
burner at suppressingfire.org
Wed Jul 13 18:04:06 UTC 2005
On Wed, 2005-07-13 at 10:30 -0400, dave walker wrote:
> I have a question, and just thought someone here may have an answer for me.
>
> I am writing a library, with plugins in Thunderbird and Gaim (for right
> now). The library is an API to edit an XML file. So both, TB and GAIM,
> should not be able to issue a write command to the file at the same
> time. My question is, am I able to use mutex in the library to allow
> only one process to write at a time, OR, will I need to use a file lock?
Mutexes are generally for thread management. Since your "app" will be
coming at the file from two entirely different processes, you'll need to
use file locking to coordinate access to that file.
http://www.erlenstar.demon.co.uk/unix/faq_3.html#SEC35
mike
> Thanks
>
> --
> Dave Walker
>
--
Michael R Head <burner at suppressingfire.org>
GPG: http://www.suppressingfire.org/~burner/gpg.key.txt (ID 23A02B1F)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050713/bf8e0de3/attachment.sig>
More information about the ubuntu-users
mailing list