Tcl Source Code

Artifact [b11d9d25a0]
Login

Artifact b11d9d25a0c6419fe7fdc4b409562f5385cd8f1c:

Attachment "tclEvent-patch-8.4a3" to ticket [464380ffff] added by rbrunner 2001-09-24 19:08:25.
--- tclEvent.c	Mon Sep 24 13:39:10 2001
+++ tclEvent.c	Mon Sep 24 13:49:01 2001
@@ -795,15 +795,6 @@
 	Tcl_MutexUnlock(&exitMutex);
 
 	/*
-	 * Clean up the library path now, before we invalidate thread-local
-	 * storage.
-	 */
-	if (tsdPtr->tclLibraryPath != NULL) {
-	    Tcl_DecrRefCount(tsdPtr->tclLibraryPath);
-	    tsdPtr->tclLibraryPath = NULL;
-	}
-
-	/*
 	 * Clean up after the current thread now, after exit handlers.
 	 * In particular, the testexithandler command sets up something
 	 * that writes to standard output, which gets closed.
@@ -907,6 +898,15 @@
 	}
 	TclFinalizeIOSubsystem();
 	TclFinalizeNotifier();
+
+	/*
+	 * Clean up the library path now, before we invalidate thread-local
+	 * storage.
+	 */
+	if (tsdPtr->tclLibraryPath != NULL) {
+	    Tcl_DecrRefCount(tsdPtr->tclLibraryPath);
+	    tsdPtr->tclLibraryPath = NULL;
+	}
 
 	/*
 	 * Blow away all thread local storage blocks.