MESSAGE
DATE | 2011-06-07 |
FROM | Ruben Safir
|
SUBJECT | Subject: [NYLXS - HANGOUT] (fwd) Re: C++ File Lokcing
|
-- forwarded message -- Path: reader1.panix.com!panix!usenet.stanford.edu!news.glorb.com!feeder.erje.net!fi.sn.net!newsfeed2.tdcnet.fi!news.song.fi!not-for-mail Message-ID: <4dedc46b$0$2829$7b1e8fa0-at-news.nbl.fi> From: Juha Nieminen Subject: Re: C++ File Lokcing Newsgroups: comp.lang.c++ References: <9559f9Fh2bU1-at-mid.individual.net> User-Agent: tin/1.9.3-20080506 ("Dalintober") (UNIX) (Linux/2.6.38.6-kapsi-grbfs+ (x86_64)) Date: 07 Jun 2011 06:25:47 GMT Lines: 17 Organization: NBL Networks Oy NNTP-Posting-Host: 217.30.184.161 X-Trace: 1307427947 news.nbl.fi 2829 217.30.184.161:37262 X-Complaints-To: abuse-at-nblnetworks.fi Xref: panix comp.lang.c++:1086160
osmium wrote: > "ruben safir" wrote: > >> Is there a C++ specific means of file locking? > > No. File locking is provided by the operating system, not an ordinary user > program, which is what a C++ compiler produces.
That answer makes no sense. There are tons of things that are provided by the OS which a normal program can use, such as reading and writing files, allocating memory, printing to stdout, etc.
The correct answer is: No, the C++ standard does not provide any standard mechanism for file locking. For that you'll have to resort to some external system-specific functions such as the ones provided by the POSIX standard or your OS API.
-- end of forwarded message --
|
|