MESSAGE
DATE | 2011-06-26 |
FROM | Ruben Safir
|
SUBJECT | Subject: [NYLXS - HANGOUT] (fwd) Re: C++ file locking
|
From owner-hangout-outgoing-at-mrbrklyn.com Sun Jun 26 17:54:34 2011 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix) id DC0A33BC5D; Sun, 26 Jun 2011 17:54:33 -0400 (EDT) Delivered-To: hangout-outgoing-at-www2.mrbrklyn.com Received: by www2.mrbrklyn.com (Postfix, from userid 28) id 8156FFE147; Sun, 26 Jun 2011 17:54:33 -0400 (EDT) Delivered-To: hangout-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by www2.mrbrklyn.com (Postfix) with ESMTP id 411663BC5D for ; Sun, 26 Jun 2011 17:54:26 -0400 (EDT) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 9954432796 for ; Sun, 26 Jun 2011 17:56:35 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 20529) id 8E74F33C69; Sun, 26 Jun 2011 17:56:35 -0400 (EDT) From: Ruben Safir To: hangout-at-nylxs.com Subject: [NYLXS - HANGOUT] (fwd) Re: C++ file locking User-Agent: tin/1.8.3-20070201 ("Scotasay") (UNIX) (NetBSD/5.1 (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Message-Id: <20110626215635.8E74F33C69-at-panix2.panix.com> Date: Sun, 26 Jun 2011 17:56:35 -0400 (EDT) Sender: owner-hangout-at-mrbrklyn.com Precedence: bulk Reply-To: hangout-at-mrbrklyn.com
-- forwarded message -- Path: reader1.panix.com!panix!not-for-mail From: Ruben Safir 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: References: <16265495-eb93-4e2e-a46c-f16bb6b19d9e-at-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-at-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: panix comp.os.linux.development.apps:166500
On Wed, 08 Jun 2011 01:37:38 -0700, Lukas 'Erdk' Redynk wrote:
> On Jun 7, 2:24Â pm, Ruben Safir 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 -- end of forwarded message --
|
|