[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: |
Sun, 31 Dec 2006 15:15:53 -0500 |
User-agent: |
Pan/0.14.2.91 (As She Crawled Across the Table) |
On Sun, 31 Dec 2006 11:48:07 -0800, Paul Pluzhnikov wrote:
> Mike - EMAIL IGNORED <m_d_berger_1900@yahoo.com> writes:
>
>> Since in my case, a preexisting file does not mean a failure, this
>> will not serve unless I use a second "locking file". I quick test
>> has verified this. If, in the above, the word "exists" were changed
>> to "opened", my purpose would be served.
>
> What exactly *is* your purpose?
>
> If it is "fail second open of the same file", then just keep track
> of already opened files in your program.
>
> From the OS stand point it is perfectly acceptable and valid to
> have the same file opened multiple times, and it is unreasonable
> to expect that it will keep track of which files you've already
> opened for you ...
>
> Cheers,
My purpose is not relevant, but I assure you that the requirement
is correctly stated. I confirmed that I can open the file O_RDWR
simultaneously from two processes. Seems to me like a good way to
make a mess of a file. I guess I will use a locking file opened
from a singleton.
Mike.
- opening twice with O_RDWR, Mike - EMAIL IGNORED, 2006/12/30
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31
- Re: opening twice with O_RDWR, Mike - EMAIL IGNORED, 2006/12/31
- Message not available
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31
- Re: opening twice with O_RDWR,
Mike - EMAIL IGNORED <=
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31
- Re: opening twice with O_RDWR, Mike - EMAIL IGNORED, 2006/12/31
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31
- Re: opening twice with O_RDWR, Mike - EMAIL IGNORED, 2006/12/31
- Re: opening twice with O_RDWR, Paul Pluzhnikov, 2006/12/31