apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doug MacEachern <do...@covalent.net>
Subject Re: apr_dso_handle_close ?
Date Tue, 10 Apr 2001 04:47:30 GMT
On Mon, 9 Apr 2001 rbb@covalent.net wrote:

> The problem is that the code you want to implement is incompatible with
> APR's dso code.  In order to use the function that you want, you would
> need to start by using the system's dlopen.  If you are going to use the
> systems dlopen, then you should use the systems dlclose.

Perl already takes care of calling the right dlopen-ish function
for the platform, which would be exactly the same as what apr_dso_load()
would call.  if you look at the patch i sent, it just exposes the part
which would call the system's dlclose, passing it what the system's dlopen
returned (same as what dso->handle would be if opened with apr_dso_load).

> What we really need, I guess, is apr_dso_put and apr_dso_get.  That would
> follow the model that we currently have, instead of creating another
> function that would take the system type directly.

something like apr_dso_put would probably work, but having to allocate the
apr_dso_handle_t and space for the registered cleanup is a waste.  when
Perl does its dlopen, it will not be calling apr_dso_put.
mod_perl needs to do the dlclose inside of a registered cleanup.
in otherwords, apr_dso_put in this case would be registering a cleanup
inside of a cleanup.

the patch would not change the behavior of the current apr_dso_*
functions, it just exposes the dlclose mapping so mod_perl doesn't need to
duplicate it.

View raw message