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


Groups > comp.lang.c++ > #6368

Re: C++ File Lokcing

From Ruben Safir <ruben@mrbrklyn.com>
Newsgroups comp.lang.c++
Subject Re: C++ File Lokcing
Date 2011-06-07 18:17 +0000
Organization PANIX Public Access Internet and UNIX, NYC
Message-ID <islpuv$rhi$1@reader1.panix.com> (permalink)
References <isjl3f$fif$1@reader1.panix.com> <9559f9Fh2bU1@mid.individual.net> <Linus-20110607083013@ram.dialup.fu-berlin.de> <islhj4$ajo$1@reader1.panix.com> <islhlo$u5n$1@dont-email.me>

Show all headers | View raw


On Tue, 07 Jun 2011 11:55:36 -0400, Victor Bazarov wrote:

> On 6/7/2011 11:54 AM, ruben safir wrote:
>> On 06/07/2011 02:33 AM, Stefan Ram wrote:
>>> "osmium"<r124c4u102@comcast.net> writes:
>>>> "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.
>>>
>>> This must be the correct answer, because Linus Torvalds also says that
>>> a C++ compiler cannot produce an operating system!
>>>
>>> (The real reason is - of coures - just that the C++ standard library
>>> does not provide this feature, but this might change in the future.)
>>>
>>>
>>
>> I have to do file locking on Linux. Do you have a recommendation?
> 
> How about news:comp.os.linux.development.apps ?
> 
> V

But Victor, if you can't file lock with posix file locking, then there is 
almost no use of ios_base for file systems.  You have to lock files on a 
multiuser OS before you write to them.  Can you get the file descriptor 
from ofsream or can you feed flock()?

Ruben

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C++ File Lokcing ruben safir <ruben@mrbrklyn.com> - 2011-06-06 22:41 +0000
  Re: C++ File Lokcing "osmium" <r124c4u102@comcast.net> - 2011-06-06 19:25 -0500
    Re: C++ File Lokcing Juha Nieminen <nospam@thanks.invalid> - 2011-06-07 06:25 +0000
    Re: C++ File Lokcing Öö Tiib <ootiib@hot.ee> - 2011-06-07 00:32 -0700
    Re: C++ File Lokcing ruben safir <ruben@mrbrklyn.com> - 2011-06-07 11:54 -0400
      Re: C++ File Lokcing Victor Bazarov <v.bazarov@comcast.invalid> - 2011-06-07 11:55 -0400
        Re: C++ File Lokcing Ruben Safir <ruben@mrbrklyn.com> - 2011-06-07 18:17 +0000
          Re: C++ File Lokcing Victor Bazarov <v.bazarov@comcast.invalid> - 2011-06-07 14:23 -0400
            Re: C++ File Lokcing Ruben Safir <ruben@mrbrklyn.com> - 2011-06-07 18:50 +0000
              Re: C++ File Lokcing Victor Bazarov <v.bazarov@comcast.invalid> - 2011-06-07 15:16 -0400
              Re: C++ File Lokcing Jeff Flinn <TriumphSprint2000@hotmail.com> - 2011-06-07 15:47 -0400
              Re: C++ File Lokcing Paavo Helde <myfirstname@osa.pri.ee> - 2011-06-07 15:04 -0500
                Re: C++ File Lokcing Ruben Safir <ruben@mrbrklyn.com> - 2011-06-07 22:46 +0000
                Re: C++ File Lokcing Nobody <nobody@nowhere.com> - 2011-06-08 07:50 +0100
                Re: C++ File Lokcing Sherm Pendley <sherm.pendley@gmail.com> - 2011-06-08 20:55 -0400
                Re: C++ File Lokcing Öö Tiib <ootiib@hot.ee> - 2011-06-08 18:33 -0700
              Re: C++ File Lokcing Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-08 07:43 +0000
            Re: C++ File Lokcing Nobody <nobody@nowhere.com> - 2011-06-07 21:21 +0100
          Re: C++ File Lokcing Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-06-08 07:21 +0000
          Re: C++ File Lokcing Paavo Helde <myfirstname@osa.pri.ee> - 2011-06-08 16:14 -0500
            Re: C++ File Lokcing drew@furrfu.invalid (Drew Lawson) - 2011-06-08 22:19 +0000
            Re: C++ File Lokcing Nobody <nobody@nowhere.com> - 2011-06-09 02:54 +0100

csiph-web