diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 12:03:17 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-03-21 12:03:17 (GMT) |
commit | 72376991f5c43b445f266ab25f73c1c41d6393f0 (patch) | |
tree | 7e61fe4a44865725423b47f70fb3238e4f2beb5f /unix | |
parent | 01d1cdb5e8789884ae310c5e38fb976559157460 (diff) | |
download | tcl-72376991f5c43b445f266ab25f73c1c41d6393f0.zip tcl-72376991f5c43b445f266ab25f73c1c41d6393f0.tar.gz tcl-72376991f5c43b445f266ab25f73c1c41d6393f0.tar.bz2 |
(cherry-pick): Fix [d3071887dbc7aeac]: Fix SEGV in Tcl_FinalizeNotifier(). Thanks to hirofumi for both the bug-report and the fix
Diffstat (limited to 'unix')
-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..1457890 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_unlock(¬ifierMutex); if (notifierThreadRunning) { int result = pthread_join((pthread_t) notifierThread, NULL); |