diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 09:05:34 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 09:05:34 (GMT) |
commit | d291d84481a5f1d56df04bfffcd53fae1a5c8a00 (patch) | |
tree | 9817e61a6ffba718d5dd2f5ae3444f0c551bbb97 /unix/tclUnixNotfy.c | |
parent | 0aecb943f5d14659cbcee9ca6733c69744ffabe1 (diff) | |
download | tcl-d291d84481a5f1d56df04bfffcd53fae1a5c8a00.zip tcl-d291d84481a5f1d56df04bfffcd53fae1a5c8a00.tar.gz tcl-d291d84481a5f1d56df04bfffcd53fae1a5c8a00.tar.bz2 |
Proposed fix for [d3071887dbc7aeac]: Fix SEGV in Tcl_FinalizeNotifier()
Diffstat (limited to 'unix/tclUnixNotfy.c')
-rw-r--r-- | unix/tclUnixNotfy.c | 2 |
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(¬ifierMutex); while(triggerPipe != -1) { pthread_cond_wait(¬ifierCV, ¬ifierMutex); } + pthread_mutex_lock(¬ifierMutex); if (notifierThreadRunning) { int result = pthread_join((pthread_t) notifierThread, NULL); |