summaryrefslogtreecommitdiffstats
path: root/src/H5.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5.c')
-rw-r--r--src/H5.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/H5.c b/src/H5.c
index c1a57c9..e4a6a88 100644
--- a/src/H5.c
+++ b/src/H5.c
@@ -144,10 +144,14 @@ H5_term_library(void)
intn pending, ntries=0, n;
uintn at=0;
char loop[1024];
+ H5E_auto_t func;
/* Don't do anything if the library is already closed */
if (!H5_libinit_g) return;
+ /* Check if we should display error output */
+ H5Eget_auto(&func,NULL);
+
/*
* Terminate each interface. The termination functions return a positive
* value if they do something that might affect some other interface in a
@@ -178,8 +182,11 @@ H5_term_library(void)
pending += DOWN(I);
} while (pending && ntries++<100);
if (pending) {
- fprintf(stderr, "HDF5: infinite loop closing library\n");
- fprintf(stderr, " %s...\n", loop);
+ /* Only display the error message if the user is interested in them. */
+ if (func) {
+ fprintf(stderr, "HDF5: infinite loop closing library\n");
+ fprintf(stderr, " %s...\n", loop);
+ }
}
/* Mark library as closed */