1 2 /* $Id: fpm_cleanup.h,v 1.5 2008/05/24 17:38:47 anight Exp $ */ 3 /* (c) 2007,2008 Andrei Nigmatulin */ 4 5 #ifndef FPM_CLEANUP_H 6 #define FPM_CLEANUP_H 1 7 8 int fpm_cleanup_add(int type, void (*cleanup)(int, void *), void *); 9 void fpm_cleanups_run(int type); 10 11 enum { 12 FPM_CLEANUP_CHILD = (1 << 0), 13 FPM_CLEANUP_PARENT_EXIT = (1 << 1), 14 FPM_CLEANUP_PARENT_EXIT_MAIN = (1 << 2), 15 FPM_CLEANUP_PARENT_EXEC = (1 << 3), 16 FPM_CLEANUP_PARENT = (1 << 1) | (1 << 2) | (1 << 3), 17 FPM_CLEANUP_ALL = ~0, 18 }; 19 20 #endif 21 22