summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--unix/tclUnixThrd.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 67b8949..8539bd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-29 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of
+ pthread_join exit return code storage. [Bug 1712723]
+
2007-05-18 Don Porter <dgp@users.sourceforge.net>
* unix/configure: autoconf-2.59 (FC6 fork)
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 2760360..5f4f15c 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixThrd.c,v 1.51 2006/12/19 16:25:02 dgp Exp $
+ * RCS: @(#) $Id: tclUnixThrd.c,v 1.52 2007/05/29 23:35:06 hobbs Exp $
*/
#include "tclInt.h"
@@ -158,12 +158,16 @@ Tcl_JoinThread(
Tcl_ThreadId threadId, /* Id of the thread to wait upon. */
int *state) /* Reference to the storage the result of the
* thread we wait upon will be written
- * into. */
+ * into. May be NULL. */
{
#ifdef TCL_THREADS
int result;
+ unsigned long retcode;
- result = pthread_join((pthread_t) threadId, (void**) state);
+ result = pthread_join((pthread_t) threadId, (void**) &retcode);
+ if (state) {
+ *state = (int) retcode;
+ }
return (result == 0) ? TCL_OK : TCL_ERROR;
#else
return TCL_ERROR;