Results 1 to 2 of 2
Hi All,
What happens if I attempt to reload a previously loaded plugin with dlopen() without using dlclose() to close it first ?
In such a case, does it give ...
- 11-13-2009 #1Just Joined!
- Join Date
- Nov 2009
- Posts
- 43
attempting to reload a previously loaded plugin with dlopen()
Hi All,
What happens if I attempt to reload a previously loaded plugin with dlopen() without using dlclose() to close it first ?
In such a case, does it give me another plugin handle for the same plugin module ? (I would have two plugin handles in this case both of which should be closed using dlclose() ?)
Thanks.
- 11-13-2009 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
From the dlopen man page:
If the same library is loaded again with dlopen(), the same file handle is
returned. The dl library maintains reference counts for library handles, so a
dynamic library is not deallocated until dlclose() has been called on it as
many times as dlopen() has succeeded on it. The _init routine, if present, is
only called once. But a subsequent call with RTLD_NOW may force symbol reso-
lution for a library earlier loaded with RTLD_LAZY.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote