summaryrefslogtreecommitdiffstats
path: root/unix/tclUnixThrd.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/tclUnixThrd.c')
-rw-r--r--unix/tclUnixThrd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index cb66d08..ac0804e 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -77,7 +77,9 @@ TclpThreadCreate(idPtr, proc, clientData)
pthread_attr_init(&attr);
pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM);
if (pthread_create((pthread_t *)idPtr, &attr,
- (void * (*)())proc, (void *)clientData) < 0) {
+ (void * (*)())proc, (void *)clientData) &&
+ pthread_create((pthread_t *)idPtr, NULL,
+ (void * (*)())proc, (void *)clientData)) {
result = TCL_ERROR;
} else {
result = TCL_OK;