Not so Ubuntu related C question

Magnus Therning magnus at therning.org
Wed Jul 13 18:14:18 UTC 2005


On Wed, Jul 13, 2005 at 10:30:55AM -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?

I would opt for a file lock, simply because the operations that must be
synchronised are on a file.

/M

-- 
Magnus Therning                    (OpenPGP: 0xAB4DFBA4)
magnus at therning.org
http://therning.org/magnus

Software is not manufactured, it is something you write and publish.
Keep Europe free from software patents, we do not want censorship
by patent law on written works.

Perpetual growth is the creed of the cancer cell.
     -- Edward Abbey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050713/7f20cc59/attachment.pgp>


More information about the ubuntu-users mailing list