You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Aaron Bannert <aa...@clove.org> on 2002/05/28 06:04:57 UTC

Re: Repeating Calls to apr_dso_load()

[copying the APR dev list]

On Tue, May 28, 2002 at 04:55:14AM +0300, Eli Marmor wrote:
> Can it be assumed that calling apr_dso_load() twice for the same shared
> object, will not re-open that file, but just returns the same handle?

LoadLibrary*() on Windows does reference counting, and same goes for
dlopen().

-aaron

Re: Repeating Calls to apr_dso_load()

Posted by Eli Marmor <ma...@netmask.it>.
Aaron Bannert wrote:

> [copying the APR dev list]

[I'm not subscribed to APR, and this message will probably be refused,
so please forward it to them]

> On Tue, May 28, 2002 at 04:55:14AM +0300, Eli Marmor wrote:
> > Can it be assumed that calling apr_dso_load() twice for the same shared
> > object, will not re-open that file, but just returns the same handle?
> 
> LoadLibrary*() on Windows does reference counting, and same goes for
> dlopen().

Thank you very much for the info about LoadLibrary().
Regarding dlopen(), I already mentioned it in my original question
(well, you wouldn't expect me to raise a question without checking it
first...).

I think that assuming that most of the rest are not critical
(NSLinkModule, load_add_on of BeOS, DosLoadModule of OS/2, dllload of
OS/390), we have only to check what happens with shl_load() (HP-UX).
If the behavior of shl_load() is similar, then it will not be wrong
to say that more than 99% of the installations of Apache behave this
way (the sum of dlopen() + shl_load() + LoadLibrary() ).

-- 
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel

Re: Repeating Calls to apr_dso_load()

Posted by Eli Marmor <ma...@netmask.it>.
Aaron Bannert wrote:

> [copying the APR dev list]

[I'm not subscribed to APR, and this message will probably be refused,
so please forward it to them]

> On Tue, May 28, 2002 at 04:55:14AM +0300, Eli Marmor wrote:
> > Can it be assumed that calling apr_dso_load() twice for the same shared
> > object, will not re-open that file, but just returns the same handle?
> 
> LoadLibrary*() on Windows does reference counting, and same goes for
> dlopen().

Thank you very much for the info about LoadLibrary().
Regarding dlopen(), I already mentioned it in my original question
(well, you wouldn't expect me to raise a question without checking it
first...).

I think that assuming that most of the rest are not critical
(NSLinkModule, load_add_on of BeOS, DosLoadModule of OS/2, dllload of
OS/390), we have only to check what happens with shl_load() (HP-UX).
If the behavior of shl_load() is similar, then it will not be wrong
to say that more than 99% of the installations of Apache behave this
way (the sum of dlopen() + shl_load() + LoadLibrary() ).

-- 
Eli Marmor
marmor@netmask.it
CTO, Founder
Netmask (El-Mar) Internet Technologies Ltd.
__________________________________________________________
Tel.:   +972-9-766-1020          8 Yad-Harutzim St.
Fax.:   +972-9-766-1314          P.O.B. 7004
Mobile: +972-50-23-7338          Kfar-Saba 44641, Israel