Lines 476-483
Link Here
|
476 |
apr_pool_t *pool); |
476 |
apr_pool_t *pool); |
477 |
|
477 |
|
478 |
|
478 |
|
479 |
/* |
479 |
/** |
480 |
* Cleanup |
480 |
* @defgroup PoolCleanup Pool Cleanup Functions |
481 |
* |
481 |
* |
482 |
* Cleanups are performed in the reverse order they were registered. That is: |
482 |
* Cleanups are performed in the reverse order they were registered. That is: |
483 |
* Last In, First Out. A cleanup function can safely allocate memory from |
483 |
* Last In, First Out. A cleanup function can safely allocate memory from |
Lines 486-491
Link Here
|
486 |
* terminates. Cleanups have to take caution in calling functions that |
486 |
* terminates. Cleanups have to take caution in calling functions that |
487 |
* create subpools. Subpools, created during cleanup will NOT automatically |
487 |
* create subpools. Subpools, created during cleanup will NOT automatically |
488 |
* be cleaned up. In other words, cleanups are to clean up after themselves. |
488 |
* be cleaned up. In other words, cleanups are to clean up after themselves. |
|
|
489 |
* |
490 |
* @{ |
489 |
*/ |
491 |
*/ |
490 |
|
492 |
|
491 |
/** |
493 |
/** |
Lines 504-512
Link Here
|
504 |
apr_status_t (*child_cleanup)(void *)); |
506 |
apr_status_t (*child_cleanup)(void *)); |
505 |
|
507 |
|
506 |
/** |
508 |
/** |
507 |
* Remove a previously registered cleanup function |
509 |
* Remove a previously registered cleanup function. |
508 |
* @param p The pool remove the cleanup from |
510 |
* |
509 |
* @param data The data to remove from cleanup |
511 |
* The most recently registered cleanup with the same values of @a p, |
|
|
512 |
* @a data and @a cleanup will be removed. |
513 |
* |
514 |
* @param p The pool to remove the cleanup from |
515 |
* @param data The data of the registered cleanup |
510 |
* @param cleanup The function to remove from cleanup |
516 |
* @param cleanup The function to remove from cleanup |
511 |
* @remarks For some strange reason only the plain_cleanup is handled by this |
517 |
* @remarks For some strange reason only the plain_cleanup is handled by this |
512 |
* function |
518 |
* function |
Lines 515-521
Link Here
|
515 |
apr_status_t (*cleanup)(void *)); |
521 |
apr_status_t (*cleanup)(void *)); |
516 |
|
522 |
|
517 |
/** |
523 |
/** |
518 |
* Replace the child cleanup of a previously registered cleanup |
524 |
* Replace the child cleanup function of a previously registered cleanup. |
|
|
525 |
* |
526 |
* The most recently registered cleanup with the same values of @a p, |
527 |
* @a data and @a plain_cleanup will have the registered child cleanup |
528 |
* function replaced with @a child_cleanup. |
529 |
* |
519 |
* @param p The pool of the registered cleanup |
530 |
* @param p The pool of the registered cleanup |
520 |
* @param data The data of the registered cleanup |
531 |
* @param data The data of the registered cleanup |
521 |
* @param plain_cleanup The plain cleanup function of the registered cleanup |
532 |
* @param plain_cleanup The plain cleanup function of the registered cleanup |
Lines 528-536
Link Here
|
528 |
apr_status_t (*child_cleanup)(void *)); |
539 |
apr_status_t (*child_cleanup)(void *)); |
529 |
|
540 |
|
530 |
/** |
541 |
/** |
531 |
* Run the specified cleanup function immediately and unregister it. Use |
542 |
* Run the specified cleanup function immediately and unregister it. |
532 |
* @a data instead of the data that was registered with the cleanup. |
543 |
* |
533 |
* @param p The pool remove the cleanup from |
544 |
* The most recently registered cleanup with the same values of @a p, |
|
|
545 |
* @a data and @a cleanup will be removed and @a cleanup will be called |
546 |
* with @a data as the argument. |
547 |
* |
548 |
* @param p The pool to remove the cleanup from |
534 |
* @param data The data to remove from cleanup |
549 |
* @param data The data to remove from cleanup |
535 |
* @param cleanup The function to remove from cleanup |
550 |
* @param cleanup The function to remove from cleanup |
536 |
*/ |
551 |
*/ |
Lines 540-547
Link Here
|
540 |
apr_status_t (*cleanup)(void *)); |
555 |
apr_status_t (*cleanup)(void *)); |
541 |
|
556 |
|
542 |
/** |
557 |
/** |
543 |
* An empty cleanup function |
558 |
* An empty cleanup function. |
544 |
* @param data The data to cleanup |
559 |
* |
|
|
560 |
* Passed to apr_pool_cleanup_register() when no cleanup is required. |
561 |
* |
562 |
* @param data The data to cleanup, will not be used by this function. |
545 |
*/ |
563 |
*/ |
546 |
APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data); |
564 |
APR_DECLARE_NONSTD(apr_status_t) apr_pool_cleanup_null(void *data); |
547 |
|
565 |
|
Lines 549-559
Link Here
|
549 |
* buffers, *don't* wait for subprocesses, and *don't* free any memory. |
567 |
* buffers, *don't* wait for subprocesses, and *don't* free any memory. |
550 |
*/ |
568 |
*/ |
551 |
/** |
569 |
/** |
|
|
570 |
* Run all registered child cleanups. |
571 |
* |
552 |
* Run all of the child_cleanups, so that any unnecessary files are |
572 |
* Run all of the child_cleanups, so that any unnecessary files are |
553 |
* closed because we are about to exec a new program |
573 |
* closed because we are about to exec a new program |
554 |
*/ |
574 |
*/ |
555 |
APR_DECLARE(void) apr_pool_cleanup_for_exec(void); |
575 |
APR_DECLARE(void) apr_pool_cleanup_for_exec(void); |
556 |
|
576 |
|
|
|
577 |
/** @} */ |
557 |
|
578 |
|
558 |
/** |
579 |
/** |
559 |
* @defgroup PoolDebug Pool Debugging functions. |
580 |
* @defgroup PoolDebug Pool Debugging functions. |