summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-01-11 10:54:48 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-01-11 10:54:48 (GMT)
commit289b2781681f8116ff2540bdffc717fc78f39fae (patch)
treee5272edc786b794af1622d65133492b3e113f7df /unix/tclUnixThrd.c
parentc1ca08db8c81d3993594cb75b7ff33a35a9bd321 (diff)
downloadtcl-289b2781681f8116ff2540bdffc717fc78f39fae.zip
tcl-289b2781681f8116ff2540bdffc717fc78f39fae.tar.gz
tcl-289b2781681f8116ff2540bdffc717fc78f39fae.tar.bz2
* unix/tclUnixThrd.c (TclpThreadGetStackSize): fix for crash in
freebsd [Bug 1860425].
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 99351a9..dfed046 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.55 2007/12/13 15:28:42 dgp Exp $
+ * RCS: @(#) $Id: tclUnixThrd.c,v 1.56 2008/01/11 10:54:49 msofer Exp $
*/
#include "tclInt.h"
@@ -253,14 +253,11 @@ TclpThreadGetStackSize(void)
if (!initialized) {
initialized = 1;
-#if 0
- if (pthread_attr_init(&threadAttr) != 0) {
- return 0;
- }
-#else
return 0;
-#endif
} else {
+ if (pthread_attr_init(&threadAttr) != 0) {
+ return -1;
+ }
if (TclpPthreadGetAttrs(pthread_self(), &threadAttr) != 0) {
pthread_attr_destroy(&threadAttr);
return (size_t)-1;