diff options
author | hobbs <hobbs@noemail.net> | 1999-12-01 00:08:27 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 1999-12-01 00:08:27 (GMT) |
commit | 63de6e7c79c18682d12967ef21e23baec90c740a (patch) | |
tree | bf294a417c25e34d85d677f306cb6dee93e150c3 /generic/tclLoad.c | |
parent | 47d9ec9098a97cd9b1772541429e0e997dcbd0a5 (diff) | |
download | tcl-63de6e7c79c18682d12967ef21e23baec90c740a.zip tcl-63de6e7c79c18682d12967ef21e23baec90c740a.tar.gz tcl-63de6e7c79c18682d12967ef21e23baec90c740a.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.
FossilOrigin-Name: 049dffa868915030187db9da16d87aecfa9e2642
Diffstat (limited to 'generic/tclLoad.c')
-rw-r--r-- | generic/tclLoad.c | 10 |
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); |