summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--unix/tclUnixNotfy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index 48ba0cc..3946c7d 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -433,9 +433,11 @@ Tcl_FinalizeNotifier(
"unable to write q to triggerPipe");
}
close(triggerPipe);
+ pthread_mutex_lock(&notifierMutex);
while(triggerPipe != -1) {
pthread_cond_wait(&notifierCV, &notifierMutex);
}
+ pthread_mutex_lock(&notifierMutex);
if (notifierThreadRunning) {
int result = pthread_join((pthread_t) notifierThread, NULL);