aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2011-08-04 15:22:05 -0400
committerJeff Garzik <jgarzik@pobox.com>2011-08-04 15:22:05 -0400
commitbd1e54bc0b7f1bdfc571edf1f4f1ecf422260b8c (patch)
treeb33258e3578815f1c2573d2ec9c757f7f30dc1c0
parenteb20f3c8f5258076d195176ac589a869a9f24708 (diff)
parent67ed7d9d4929d8fe1c5f976c184c72dff02d83b7 (diff)
Merge branch 'tmp2'
-rw-r--r--src/util.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/util.h b/src/util.h
index 9922ba82a9..8588201dae 100644
--- a/src/util.h
+++ b/src/util.h
@@ -623,7 +623,10 @@ inline pthread_t CreateThread(void(*pfn)(void*), void* parg, bool fWantHandle=fa
return (pthread_t)0;
}
if (!fWantHandle)
+ {
+ pthread_detach(hthread);
return (pthread_t)-1;
+ }
return hthread;
}