diff options
Diffstat (limited to 'src/H5.c')
-rw-r--r-- | src/H5.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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 */ |