From dad51dd35e51fb99f720f24336f04aacd1aa5d08 Mon Sep 17 00:00:00 2001 From: hobbs Date: Wed, 1 Dec 1999 00:08:28 +0000 Subject: * 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. --- generic/tclLoad.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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); -- cgit v0.12