This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: File locking
- From: Paolo Carlini <pcarlini at unitus dot it>
- To: Chris Blake <Chris dot Blake at anu dot edu dot au>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 22 Jan 2002 09:28:51 +0100
- Subject: Re: File locking
- References: <Pine.GSO.4.05.10201221527430.626-100000@bloch>
Chris Blake wrote:
>How does one do Posix file locking with gcc3 / libstdc++-v3?
>I posted this question to gcc-help last week, but it seems that
>nobody knows the answer. I realise the C++ standard may not concern
>itself with such OS-specific things as file locking, but I'd appreciate
>any suggestions, even if the only solution is to reinstall g++ 2.95.
>
Hi,
I found useful, as a starting point, the following class:
http://suter.home.cern.ch/suter/RWLock.html
Notice, however, that, due to a more strict implementation of the ISO
IOstreams, *as is* the class does not work well with the current
libstdc++-v3 library.
Please contact me privately if you want to test an updated version I'
currently experimenting with.
Cheers,
Paolo.