On Sun, 31 Dec 2006 11:48:07 -0800, Paul Pluzhnikov wrote: > Mike - EMAIL IGNORED <[EMAIL PROTECTED]> 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. _______________________________________________ help-gplusplus mailing list help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus