summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixNotfy.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r--unix/tclUnixNotfy.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c
index c80e566..bd4f68f 100644
--- a/unix/tclUnixNotfy.c
+++ b/unix/tclUnixNotfy.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixNotfy.c,v 1.24 2005/05/14 20:46:48 das Exp $
+ * RCS: @(#) $Id: tclUnixNotfy.c,v 1.25 2005/05/31 11:37:46 vasiljevic Exp $
*/
#ifndef HAVE_COREFOUNDATION /* Darwin/Mac OS X CoreFoundation notifier
@@ -220,7 +220,7 @@ Tcl_InitNotifier()
Tcl_MutexLock(&notifierMutex);
if (notifierCount == 0) {
if (TclpThreadCreate(&notifierThread, NotifierThreadProc, NULL,
- TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) {
+ TCL_THREAD_STACK_DEFAULT, TCL_THREAD_JOINABLE) != TCL_OK) {
Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread");
}
}
@@ -273,6 +273,7 @@ Tcl_FinalizeNotifier(clientData)
*/
if (notifierCount == 0) {
+ int result;
if (triggerPipe < 0) {
Tcl_Panic("Tcl_FinalizeNotifier: notifier pipe not initialized");
}
@@ -291,6 +292,10 @@ Tcl_FinalizeNotifier(clientData)
close(triggerPipe);
Tcl_ConditionWait(&notifierCV, &notifierMutex, NULL);
+ result = Tcl_JoinThread(notifierThread);
+ if (result) {
+ Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread");
+ }
}
/*