2 * cleanup.h - Cleanup and shutdown framework.
4 * Copyright 2004 Jonathan McDowell <noodles@earth.li>
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License as published by the Free
8 * Software Foundation; version 2 of the License.
10 * This program is distributed in the hope that it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc., 51
17 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 * trytocleanup - say we should try to cleanup.
28 * This function sets the cleanup flag indicating we want to try and
31 void trytocleanup(void);
34 * cleanup - indicate if we should try to cleanup.
36 * This function returns a bool which indicates if we want to cleanup and
42 * catchsignals - Register signal handlers for various signals.
44 * This function registers a signal handler for various signals (PIPE,
45 * ALRM, INT, TERM, HUP) that sets the cleanup flag so we try to exit
48 void catchsignals(void);
50 #endif /* __CLEANUP_H__ */