diff options
| author | hobbs <hobbs> | 2007-05-29 23:35:05 (GMT) | 
|---|---|---|
| committer | hobbs <hobbs> | 2007-05-29 23:35:05 (GMT) | 
| commit | 063f158df125b53afc44325a80d5c770efcf37c8 (patch) | |
| tree | 4314da52ad4247696c8d9ce3ed8e5e32f1ea0063 /unix/tclUnixThrd.c | |
| parent | f9ce97282c35d62d7374f2d8b06240846720bb00 (diff) | |
| download | tcl-063f158df125b53afc44325a80d5c770efcf37c8.zip tcl-063f158df125b53afc44325a80d5c770efcf37c8.tar.gz tcl-063f158df125b53afc44325a80d5c770efcf37c8.tar.bz2  | |
	* unix/tclUnixThrd.c (Tcl_JoinThread): fix for 64-bit handling of
	pthread_join exit return code storage. [Bug 1712723]
Diffstat (limited to 'unix/tclUnixThrd.c')
| -rw-r--r-- | unix/tclUnixThrd.c | 10 | 
1 files changed, 7 insertions, 3 deletions
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;  | 
