summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-12-01 00:08:28 (GMT)
committerhobbs <hobbs>1999-12-01 00:08:28 (GMT)
commitdad51dd35e51fb99f720f24336f04aacd1aa5d08 (patch)
treebf294a417c25e34d85d677f306cb6dee93e150c3
parented5c8c5b5428c8ed9ba6499951da365c2e86f054 (diff)
downloadtcl-dad51dd35e51fb99f720f24336f04aacd1aa5d08.zip
tcl-dad51dd35e51fb99f720f24336f04aacd1aa5d08.tar.gz
tcl-dad51dd35e51fb99f720f24336f04aacd1aa5d08.tar.bz2
* generic/tclLoad.c: #def'd out the unloading of DLLs at finalize
time for Unix in TclFinalizeLoad. [Bug: 2560 3373] Should be parametrized to allow for user to specify unload or not.
-rw-r--r--generic/tclLoad.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 68a0f8c..3b36b9c 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoad.c,v 1.3 1999/04/16 00:46:50 stanton Exp $
+ * RCS: @(#) $Id: tclLoad.c,v 1.4 1999/12/01 00:08:28 hobbs Exp $
*/
#include "tclInt.h"
@@ -645,9 +645,17 @@ TclFinalizeLoad()
while (firstPackagePtr != NULL) {
pkgPtr = firstPackagePtr;
firstPackagePtr = pkgPtr->nextPtr;
+#if defined(TCL_UNLOAD_DLLS) || defined(__WIN32__)
+ /*
+ * Some Unix dlls are poorly behaved - registering things like
+ * atexit calls that can't be unregistered. If you unload
+ * such dlls, you get a core on exit because it wants to
+ * call a function in the dll after it's been unloaded.
+ */
if (pkgPtr->fileName[0] != '\0') {
TclpUnloadFile(pkgPtr->clientData);
}
+#endif
ckfree(pkgPtr->fileName);
ckfree(pkgPtr->packageName);
ckfree((char *) pkgPtr);