Bill Allombert on Tue, 26 Nov 2002 22:17:07 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Patch for install: allow to change prototype


On Tue, Nov 26, 2002 at 12:31:45PM -0800, Ilya Zakharevich wrote:
> On Tue, Nov 26, 2002 at 02:55:33PM +0100, Karim BELABAS wrote:
> > > BTW, I see no reason to have the warning at all.  How is it different from
> 
> > >  ? f() = 12
> > >  ? f() = 12
> > 
> > I don't know how to safely "reload" a symbol from an external library. In
> > particular, you cannot recompile an external module, and re-install a
> > routine. You can kill() its GP wrapper, then formally re-install it, but
> > unless dlclose() is called first, you install the old version (still loaded
> > in memory).
> 
> If I understand it correct, the *only* information we keep about the
> address space of the external library is an entry in entree.  Thus it
> should be safe to do dlclose() at the appropriate time.  (Note that
> Perl has no notion of unloading a module due to much more flexible
> interface, thus uncontrollable "pollution" of data with addresses from
> the library.)

As I understand, the problem is not so much if doing dlclose() is safe, it is
wether dlclose() will really unload the module so that a subsequent dlopen()
load the new module, especially if it has the same filename that the previous
one.

Anyway I would be very interested if you can make that work!

Cheers,
Bill
PS: Any clue about compiling dlopen()able module for MacOS X ??