From: Gurusamy Sarathy Date: Wed, 1 Mar 2000 16:38:48 +0000 (+0000) Subject: avoid DProf entering dl_unload_file() (from Alan Burlison) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=228515436ab73df2fc5bb6a3bf2cf5e72ce8bda7;p=p5sagit%2Fp5-mst-13.2.git avoid DProf entering dl_unload_file() (from Alan Burlison) p4raw-id: //depot/perl@5402 --- diff --git a/ext/DynaLoader/DynaLoader_pm.PL b/ext/DynaLoader/DynaLoader_pm.PL index 6a3d4a3..0e0f792 100644 --- a/ext/DynaLoader/DynaLoader_pm.PL +++ b/ext/DynaLoader/DynaLoader_pm.PL @@ -654,8 +654,7 @@ This function is optional and may not necessarily be provided on all platforms. If it is defined, it is called automatically when the interpreter exits for every shared object or library loaded by DynaLoader::bootstrap. All such library references are stored in @dl_librefs by DynaLoader::Bootstrap as it -loads the libraries. The files are unloaded in the reverse order in to they -were initially loaded. +loads the libraries. The files are unloaded in last-in, first-out order. This unloading is usually necessary when embedding a shared-object perl (e.g. one configured with -Duseshrplib) within a larger application, and the perl diff --git a/ext/DynaLoader/dlutils.c b/ext/DynaLoader/dlutils.c index 9423085..5c6bbea 100644 --- a/ext/DynaLoader/dlutils.c +++ b/ext/DynaLoader/dlutils.c @@ -45,7 +45,7 @@ dl_unload_all_files(pTHXo_ void *unused) PUSHMARK(SP); XPUSHs(sv_2mortal(dl_libref)); PUTBACK; - call_sv((SV*)sub, G_DISCARD); + call_sv((SV*)sub, G_DISCARD | G_NODEBUG); FREETMPS; LEAVE; }