[Hdf-forum] Multiple file opens

Allen Sanderson allen at sci.utah.edu
Thu Jan 14 13:37:50 EST 2010


HI,

This morning I was able to track down a bug with a file with external  
links where the file was opened twice simultaneously. The first open  
was read only. The second open was read write.  However, if I create  
the file with the exact same hierarchy but without links I do not see  
the bug. I found this odd.

Here is the sequence

fp1 = open file read only

gp1 = open /group using fp1 (note /group is an eternal link)

fp2 = open file read/write

dp2 = open /group/dataset using fp2

the last open fails. I can understand the failure given the gp1 is  
read only and dp2 which is under it is trying to perhaps do a write  
which could cause some problems.  So it fails.

However, if the file has the same hierarchy but without the link it  
does not fail. I found this behavior strange as I would have expected  
both to behave the same.

Obviously, one solution is not to open the file twice which is  
certainly possible but also having both opens be read/write also  
works. But I am more concerned with the inconsistency.


Cheers,

Allen


Allen Sanderson
SCI Institute
University of Utah
www.sci.utah.edu



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.hdfgroup.org/pipermail/hdf-forum_hdfgroup.org/attachments/20100114/dab0d89e/attachment.html>


More information about the Hdf-forum mailing list