summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-01-07 17:14:26 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-01-07 17:14:26 (GMT)
commit159fa7a232e1961940b83f035f4c27338d26337e (patch)
treeb7344e9cfaadbbec3bc3a0576df8c264debb8239 /src/H5F.c
parent1d17defdfc977c063c7ff20b5868bef9a76e5d9a (diff)
downloadhdf5-159fa7a232e1961940b83f035f4c27338d26337e.zip
hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.gz
hdf5-159fa7a232e1961940b83f035f4c27338d26337e.tar.bz2
[svn-r151] Changes since 19980105
---------------------- ./config/freebsd2.2.1 ./config/linux Added -UH5O_DEBUG to the debug flags. Turn this on to get lots of lines on stderr to show what objects are opened and closed. ./src/H5C.o ./src/H5Cpublic.h ./test/dsets.c ./test/tfile.c Split H5Cget_prop() and H5Cset_prop() into functions for each property. ./src/H5D.c ./src/H5Dpublic.h ./src/H5Gstab.c ./src/H5O.c ./src/H5Ocont.c ./src/H5Ocstore.c ./src/H5Odtype.c ./src/H5Oefl.c ./src/H5Oistore.c ./src/H5Oname.c ./src/H5Onull.c ./src/H5Oprivate.h ./src/H5Osdspace.c ./src/H5Ostab.c ./src/H5P.c ./src/istore.c ./test/tohdr.c Object header functions now understand constant vs. non-constant messages. ./src/H5F.c ./src/H5Fprivate.h The file OID can be closed before other OID's. ./src/H5Flow.c H5F_addr_defined() is a macro in this file. ./src/H5G.c ./src/H5Gpublic.h ./test/tstab.c A current working group cannot be deleted. ./src/H5Gent.c ./src/H5Gpkg.h Removed unused functionality. ./src/H5public.h Includes <sys/types.h> for size_t.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/H5F.c b/src/H5F.c
index c07ac38..416f3e9 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -1246,6 +1246,28 @@ H5F_close (H5F_t *f)
HRETURN_ERROR (H5E_CACHE, H5E_CANTFLUSH, FAIL, "can't flush cache");
}
+ /*
+ * If object headers are still open then delay deletion of resources until
+ * they have all been closed. The file is in a consistent state now, so
+ * forgetting to close everything is not a major problem.
+ */
+ if (f->nopen>0) {
+#ifndef NDEBUG
+ fprintf (stderr, "HDF5-DIAG: H5F_close: %d object header%s still "
+ "open (file close will complete when %s closed)\n",
+ f->nopen,
+ 1==f->nopen?" is":"s are",
+ 1==f->nopen?"that header is":"those headers are");
+#endif
+ f->close_pending = TRUE;
+ HRETURN (SUCCEED);
+ } else if (f->close_pending) {
+#ifndef NDEBUG
+ fprintf (stderr, "HDF5-DIAG: H5F_close: operation completed\n");
+#endif
+ }
+
+
/* Dump debugging info */
if (f->intent & H5F_ACC_DEBUG) H5AC_debug (f);