diff options
author | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2001-08-28 00:16:08 +0000 |
---|---|---|
committer | bnicholes <bnicholes@13f79535-47bb-0310-9956-ffa450edef68> | 2001-08-28 00:16:08 +0000 |
commit | 968e86e61a2bc600995b49318821922fa7441f25 (patch) | |
tree | 442a3004c0114b553bb5fa3ce464f2cb0f406680 /dso | |
parent | 6c133a9cc34bb141440d2ed724fd40286623417d (diff) | |
download | libapr-968e86e61a2bc600995b49318821922fa7441f25.tar.gz |
Basically added a call to apr_dso_load() to make sure that any module that
is loaded by APR will be autounloaded by the OS when all references to
the module are released
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@62233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'dso')
-rw-r--r-- | dso/unix/dso.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dso/unix/dso.c b/dso/unix/dso.c index 726034c78..6fe8b0f11 100644 --- a/dso/unix/dso.c +++ b/dso/unix/dso.c @@ -72,6 +72,13 @@ #include <string.h> /* for strerror() on HP-UX */ #endif +#ifdef NETWARE +#include <library.h> +#include <unistd.h> + +static int setautounloadflag (const char *path); +#endif + APR_DECLARE(apr_status_t) apr_os_dso_handle_put(apr_dso_handle_t **aprdso, apr_os_dso_handle_t osdso, apr_pool_t *pool) @@ -163,6 +170,10 @@ APR_DECLARE(apr_status_t) apr_dso_load(apr_dso_handle_t **res_handle, apr_pool_cleanup_register(pool, *res_handle, dso_cleanup, apr_pool_cleanup_null); +#ifdef NETWARE + setautounloadflag(path); +#endif + return APR_SUCCESS; } @@ -244,4 +255,14 @@ APR_DECLARE(const char *) apr_dso_error(apr_dso_handle_t *dso, char *buffer, return "No Error"; } +#ifdef NETWARE +static int setautounloadflag (const char *path) +{ + char name[256]; + + deconstruct(path, NULL, NULL, NULL, name, NULL, NULL, PATH_UNDEF); + SetAutoUnloadFlag(findnlmhandle(name, getaddressspace())); +} +#endif + #endif |