diff options
author | vasiljevic <zv@archiware.com> | 2005-05-31 11:37:46 (GMT) |
---|---|---|
committer | vasiljevic <zv@archiware.com> | 2005-05-31 11:37:46 (GMT) |
commit | cc4c22c09b48294e5c20633376829d0f298eb20c (patch) | |
tree | 6116b73ac37a7b545ad590ba18b36d54ed5c4d78 /unix/tclUnixNotfy.c | |
parent | f56803c5b276118ed170be0eb13b83d2804df55a (diff) | |
download | tcl-cc4c22c09b48294e5c20633376829d0f298eb20c.zip tcl-cc4c22c09b48294e5c20633376829d0f298eb20c.tar.gz tcl-cc4c22c09b48294e5c20633376829d0f298eb20c.tar.bz2 |
The notifier thread is now created as joinable and properly joined in
the Tcl_FinalizeNotifier.
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r-- | unix/tclUnixNotfy.c | 9 |
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(¬ifierMutex); if (notifierCount == 0) { if (TclpThreadCreate(¬ifierThread, 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(¬ifierCV, ¬ifierMutex, NULL); + result = Tcl_JoinThread(notifierThread); + if (result) { + Tcl_Panic("Tcl_FinalizeNotifier: unable to join notifier thread"); + } } /* |