Does HDF5 try to close files on exit?

Hi,

If I open a file object, modify it/write some data/etc, but then
forget to close the file before the application exits, what happens?
Does HDF5 try to properly close open files when the application shuts
down? Or am I likely to see file corruption?

Thanks,
Andrew

Hi,

  HDF5 registers itself using the atexit() function, see e.g.

http://www.kernel.org/doc/man-pages/online/pages/man3/atexit.3.html

to provide cleanup at program exit. So all files should be closed properly
even if the application fails to do so explicitly. However, this functionality
can be disabled explicitly, see

http://www.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-DontAtExit

    Werner

···

On Thu, 16 Jun 2011 19:17:32 -0500, Andrew Collette <andrew.collette@gmail.com> wrote:

Hi,

If I open a file object, modify it/write some data/etc, but then
forget to close the file before the application exits, what happens?
Does HDF5 try to properly close open files when the application shuts
down? Or am I likely to see file corruption?

Thanks,
Andrew

_______________________________________________
Hdf-forum is for HDF software users discussion.
Hdf-forum@hdfgroup.org
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

--
___________________________________________________________________________
Dr. Werner Benger Visualization Research
Laboratory for Creative Arts and Technology (LCAT)
Center for Computation & Technology at Louisiana State University (CCT/LSU)
211 Johnston Hall, Baton Rouge, Louisiana 70803
Tel.: +1 225 578 4809 Fax.: +1 225 578-5362