#include "worgen.h" #include "util.h"
int c_remove_cleanup_handler (void)
The c_remove_cleanup_handler() routine is used to reset the way signals are handled to their state prior to calling c_install_cleanup_handler(). E_SUCC is returned if signal handler was successfully reset. E_FAIL is returned if an error occurred resetting the signal handler.
c_remove_cleanup_handler() returns
E_SUCC (0) --> successful completion E_FAIL (-1) --> operation failed
1) At this time this library handles the SIGTERM and SIGABRT signals.
2) c_remove_cleanup_handler() should be used to reset the signal
handlers set by
c_install_cleanup_handler(). If
c_install_cleanup_handler() has not been called (or called
successfully), then this routine will not try to clean up the signal
handlers.
3) Once the signal handlers are reset, then information is sent to
c_install_cleanup_handler() so that it knows the signal handlers
have been reset.
4) If the first signal cannot be reset, try to reset the next signal
before returning.
be cleaned up, and should be prepared to handle a signal that is thrown
while cleaning up your files or unmounting your tape/CD. When deleting
an array of files, delete them from the end of the list and decrement
the file counter. If a signal is thrown while deleting the files, the
status of the file counter should be correct.