Hi Dana,

Thank you for your answer. The upcoming locking stuff sounds perfect. What
is the timeline for 1.10.0 release?

It looks like I can use Win32 LockFile() on offset 0 to the max file size
in the meantime.
 I didn't realize before that LockFile allowed ranges past the present eof.

Thanks,
David

On Mon, Nov 16, 2015 at 9:58 AM, Dana Robinson <[email protected]>
wrote:

> Hi David,
>
>
>
> Yes, a similar mechanism to that used on POSIX is used on Windows. We use
> the file index and volume serial number to detect if a file is being
> re-opened, which should work on NTFS but has caveats on FAT-based systems.
> Keep in mind that this is only from the same process; we don't detect if
> files are open across processes. The upcoming 1.10.0 will include a file
> locking mechanism that should mitigate certain bad use cases like multiple
> processes opening a file for write access, though. That should work on
> Windows as well, though we are still in the process of generating a Win32
> equivalent.
>
>
>
> Dana Robinson
>
> Software Engineer
>
> The HDF Group
>
>
>
> *From:* Hdf-forum [mailto:[email protected]] *On
> Behalf Of *David
> *Sent:* Monday, November 16, 2015 12:46 PM
> *To:* HDF Users Discussion List <[email protected]>
> *Subject:* [Hdf-forum] Multiply Opened Files
>
>
>
> I found this in the reference manual about H5Fopen():
> "In some cases, such as files on a local Unix file system, the HDF5
> library can detect that a file is multiply opened and will maintain
> coherent access among the file identifiers"
>
> Does HDF5 maintain multi-open coherent access on Windows also?
>
> Ideally I'd like to have the file locked so that multiple opens are not
> possible but I can't figure out a way to do that on Windows. Something like
> the flock() method for Unix I've seen on this forum would be fine but I
> only see file locking available via CreateFile() in the Windows API.
>
>
>
> - David
>
> _______________________________________________
> Hdf-forum is for HDF software users discussion.
> [email protected]
> http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
> Twitter: https://twitter.com/hdf5
>
_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to