1 /* (c) 2007,2008 Andrei Nigmatulin */ 2 3 #ifndef FPM_CLEANUP_H 4 #define FPM_CLEANUP_H 1 5 6 int fpm_cleanup_add(int type, void (*cleanup)(int, void *), void *); 7 void fpm_cleanups_run(int type); 8 9 enum { 10 FPM_CLEANUP_CHILD = (1 << 0), 11 FPM_CLEANUP_PARENT_EXIT = (1 << 1), 12 FPM_CLEANUP_PARENT_EXIT_MAIN = (1 << 2), 13 FPM_CLEANUP_PARENT_EXEC = (1 << 3), 14 FPM_CLEANUP_PARENT = (1 << 1) | (1 << 2) | (1 << 3), 15 FPM_CLEANUP_ALL = ~0, 16 }; 17 18 #endif 19