Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.development.apps > #142

Re: C++ file locking

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!198.186.194.249.MISMATCH!transit3.readnews.com!news-out.readnews.com!news-xxxfer.readnews.com!panix!not-for-mail
From Ruben Safir <ruben@mrbrklyn.com>
Newsgroups comp.os.linux.development.apps
Subject Re: C++ file locking
Date Fri, 10 Jun 2011 03:54:23 +0000 (UTC)
Organization PANIX Public Access Internet and UNIX, NYC
Lines 20
Message-ID <iss4hf$fjr$1@reader1.panix.com> (permalink)
References <islqdb$rhi$3@reader1.panix.com> <16265495-eb93-4e2e-a46c-f16bb6b19d9e@b1g2000yql.googlegroups.com>
NNTP-Posting-Host www2.mrbrklyn.com
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding 8bit
X-Trace reader1.panix.com 1307678063 15995 96.57.23.82 (10 Jun 2011 03:54:23 GMT)
X-Complaints-To abuse@panix.com
NNTP-Posting-Date Fri, 10 Jun 2011 03:54:23 +0000 (UTC)
X-Blackjet Blackjet is a Yankee Fan
X-DRMisTHEFT Use GNU Linux today
X-From A Dark Cloud
X-LOCATION Brooklyn NY - Forget abou' it!
X-NYLXS Really - yah think computers are supposed to be broken?
User-Agent Pan/0.133 (House of Butterflies)
Xref x330-a1.tempe.blueboxinc.net comp.os.linux.development.apps:142

Show key headers only | View raw


On Wed, 08 Jun 2011 01:37:38 -0700, Lukas 'Erdk' Redynk wrote:

> On Jun 7, 2:24 pm, Ruben Safir <ru...@mrbrklyn.com> wrote:
>> Is there any means to do file locking with C++?
>>
>> Ruben
> 
> You could try this:
> http://linux.die.net/man/3/lockf
> or
> http://www.manpagez.com/man/2/fcntl/ - especially F_GETLK and F_SETLK
> 
> Erdk


Yes but these both require you to get a file descriptor from the open 
call, effectively doing an end run around ios_base.  Is there no purely C+
+ mechanism of do this, or aquiring the file descriptor from iosteams?

Ruben

Back to comp.os.linux.development.apps | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

C++ file locking Ruben Safir <ruben@mrbrklyn.com> - 2011-06-07 18:24 +0000
  Re: C++ file locking "Lukas 'Erdk' Redynk" <mr.erdk@gmail.com> - 2011-06-08 01:37 -0700
    Re: C++ file locking Ruben Safir <ruben@mrbrklyn.com> - 2011-06-10 03:54 +0000
      Re: C++ file locking Richard Kettlewell <rjk@greenend.org.uk> - 2011-06-10 09:31 +0100
        Re: C++ file locking Ruben Safir <mrbrklyn@panix.com> - 2011-06-27 12:29 +0000
      Re: C++ file locking Rainer Weikusat <rweikusat@mssgmbh.com> - 2011-06-10 16:53 +0100
      Re: C++ file locking Lew Pitcher <lpitcher@teksavvy.com> - 2011-06-10 13:45 -0400
  Re: C++ file locking Ruben Safir <mrbrklyn@panix.com> - 2011-06-26 21:55 +0000

csiph-web