help-gplusplus
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: opening twice with O_RDWR


From: Mike - EMAIL IGNORED
Subject: Re: opening twice with O_RDWR
Date: Mon, 01 Jan 2007 17:47:29 -0500
User-agent: Pan/0.14.2.91 (As She Crawled Across the Table)

On Sun, 31 Dec 2006 14:34:01 -0800, Paul Pluzhnikov wrote:

> Mike - EMAIL IGNORED <m_d_berger_1900@yahoo.com> writes:
> 
>> [quoted text muted]
> 
> Who said anything about "lock" ?
> 
> Try "man 3 lockf" instead.
> 
> Cheers,

Thanks for this; it solves my problem >between< processes.
But it does not work >within< a process; it is possible to
take the same lock twice in the same process.  However, as
previously mentioned, I can deal with that by accessing
the file via a singleton.

Now I have noticed that closing the file releases the
lock, so I wonder if use of F_ULOCK is really necessary.
I am calling it in case it releases resources that the
close() might miss.

Mike.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]