This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to implement File locking for fstream class object


Quoting Ajay Bansal <Ajay_Bansal@infosys.com>:

> Hi,
> 
> I am using fstream in my application. I need to implement locking on my
> file. Earlier fd method of filebuf class was available which gave me
> filedescriptor. That file descriptor can be used by lockf or fcntl
> system calls to implement file locking. How do I achive file locking
> using me fstream object now?????

Have a look at:

  http://suter.home.cern.ch/suter/RWLock.html

This should also be in the FAQ, but I never got around to do it :-(

Paolo.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]