develooper Front page | perl.perl5.porters | Postings from May 2002

darwin DynaLoader issues

Thread Next
From:
Doug MacEachern
Date:
May 29, 2002 22:20
Subject:
darwin DynaLoader issues
Message ID:
Pine.LNX.4.33.0205292150450.27841-100000@mako.covalent.net
dl_dyld.xs (darwin) needs to implement DL_LOADONCEONLY semantics similar 
to what dl_next.xs does.  a few issues with this:

1) dMY_CXT is per-interpreter, not per-process.
   (means next is also broken when using threads)

2) DynaLoader needs to be adjusted to properly support this.
case-in-point, dl_next.xs does this:
    /* Do not load what is already loaded into this process */
    if (hv_fetch(dl_loaded_files, path, strlen(path), 0))
	return path;  <--

the return value which is pushed into @DynaLoader::dl_librefs.
bad news for modperl, if something in dl_librefs is not actually a libref.
since it needs to close the handles of all extension shared libraries when 
apache restarts.

the problem can be seen with the script below: 
require Socket;

%INC = ();

undef &Socket::bootstrap;

require Socket;

dies with:
..../auto/Socket/Socket.bundle definition of _XS_Socket_constant

wouldn't see that in the real-world, but simulates what would happen with 
multiple interpreters.

thoughts?



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About