Back to index

php5  5.3.10
Enumerations | Functions
fpm_cleanup.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Enumerations

enum  {
  FPM_CLEANUP_CHILD = (1 << 0), FPM_CLEANUP_PARENT_EXIT = (1 << 1), FPM_CLEANUP_PARENT_EXIT_MAIN = (1 << 2), FPM_CLEANUP_PARENT_EXEC = (1 << 3),
  FPM_CLEANUP_PARENT = (1 << 1) | (1 << 2) | (1 << 3), FPM_CLEANUP_ALL = ~0
}

Functions

int fpm_cleanup_add (int type, void(*cleanup)(int, void *), void *)
void fpm_cleanups_run (int type)

Enumeration Type Documentation

anonymous enum
Enumerator:
FPM_CLEANUP_CHILD 
FPM_CLEANUP_PARENT_EXIT 
FPM_CLEANUP_PARENT_EXIT_MAIN 
FPM_CLEANUP_PARENT_EXEC 
FPM_CLEANUP_PARENT 
FPM_CLEANUP_ALL 

Definition at line 11 of file fpm_cleanup.h.

     {
       FPM_CLEANUP_CHILD                                = (1 << 0),
       FPM_CLEANUP_PARENT_EXIT                          = (1 << 1),
       FPM_CLEANUP_PARENT_EXIT_MAIN              = (1 << 2),
       FPM_CLEANUP_PARENT_EXEC                          = (1 << 3),
       FPM_CLEANUP_PARENT                               = (1 << 1) | (1 << 2) | (1 << 3),
       FPM_CLEANUP_ALL                                         = ~0,
};

Function Documentation

int fpm_cleanup_add ( int  type,
void(*)(int, void *)  cleanup,
void *   
)

Definition at line 20 of file fpm_cleanup.c.

{
       struct cleanup_s *c;

       c = fpm_array_push(&cleanups);

       if (!c) {
              return -1;
       }

       c->type = type;
       c->cleanup = cleanup;
       c->arg = arg;

       return 0;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void fpm_cleanups_run ( int  type)

Definition at line 38 of file fpm_cleanup.c.

{
       struct cleanup_s *c = fpm_array_item_last(&cleanups);
       int cl = cleanups.used;

       for ( ; cl--; c--) {
              if (c->type & type) {
                     c->cleanup(type, c->arg);
              }
       }

       fpm_array_free(&cleanups);
}

Here is the call graph for this function:

Here is the caller graph for this function: