git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
36cd1ad
)
Fix UNIX-specific thread handle leak.
author
JoelKatz
<DavidJoelSchwartz@GMail.com>
Mon, 25 Jul 2011 22:06:45 +0000 (15:06 -0700)
committer
JoelKatz
<DavidJoelSchwartz@GMail.com>
Mon, 25 Jul 2011 22:06:45 +0000 (15:06 -0700)
src/util.h
patch
|
blob
|
history
diff --git
a/src/util.h
b/src/util.h
index
9922ba8
..
8588201
100644
(file)
--- 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;
}