diff options
author | Ryan Bloom <rbb@apache.org> | 2001-01-19 03:13:02 +0000 |
---|---|---|
committer | Ryan Bloom <rbb@apache.org> | 2001-01-19 03:13:02 +0000 |
commit | 3bc9bac48412614c20954e76c4ad66c9ff1b2983 (patch) | |
tree | 5c979cc1ddbb3d1178e7d5dc58c04655a6a6f995 /dso/unix | |
parent | 250890a512971f9bfbc5481d4b04916d456f2600 (diff) | |
download | apr-3bc9bac48412614c20954e76c4ad66c9ff1b2983.tar.gz |
All platforms now register a cleanup when a DSO is loaded. This just
makes a practice uniform across all platforms. In the past, this was
done differently on different platforms.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@61076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso/unix')
-rw-r--r-- | dso/unix/dso.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c index 154a11fb0..ada9c314f 100644 --- a/dso/unix/dso.c +++ b/dso/unix/dso.c @@ -61,6 +61,12 @@ #include <stddef.h> #endif +static apr_status_t dso_cleanup(void *thedso) +{ + apr_dso_handle_t *dso = thedso; + return apr_dso_unload(dso); +} + APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, const char *path, apr_pool_t *ctx) { @@ -88,6 +94,9 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, (*res_handle)->handle = (void*)os_handle; (*res_handle)->cont = ctx; (*res_handle)->errormsg = NULL; + + apr_register_cleanup(ctx, *res_handle, dso_cleanup, apr_null_cleanup); + return APR_SUCCESS; } |