Whamcloud - gitweb
libext2fs: support atexit cleanups
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 5 May 2015 14:40:21 +0000 (10:40 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 5 May 2015 14:40:34 +0000 (10:40 -0400)
commitdc248a10ca498c96734f9568c213ace4a92aefa9
tree0707f7b9759a7062ff7dc0e19a7cd683ad1414a7
parent4892bce3c433a710ebb3a354329e21b44e95214c
libext2fs: support atexit cleanups

Use the atexit() function to provide a means for the library to clean
itself up on program exit.  This will be used by the undo IO manager
to flush the undo file state to disk if the program should terminate
without closing the io channel, since most e2fsprogs clients will
simply exit() when they hit errors.

This won't help for signal termination; client programs must set
up signal handlers.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/Makefile.in
lib/ext2fs/atexit.c [new file with mode: 0644]
lib/ext2fs/ext2fsP.h
lib/ext2fs/undo_io.c