Hi,
I previously sent the following mail.
> Message-Id: <[EMAIL PROTECTED]>
> Subject: [PATCH] handle leak problem (threadproc/win32/thread.c)
> Date: Thu, 22 Aug 2002 21:58:39 +0900 (JST)
I have to say the patch contained a side effect.
But the problem I pointed out is still valid.
I have a new patch.
Please review it.
Thanks.
- INOUE Seiichiro <[EMAIL PROTECTED]>
Index: thread.c
===================================================================
RCS file: /home/cvspublic/apr/threadproc/win32/thread.c,v
retrieving revision 1.47
diff -u -r1.47 thread.c
--- thread.c 19 Mar 2002 17:54:00 -0000 1.47
+++ thread.c 1 Sep 2002 08:54:51 -0000
@@ -163,6 +163,10 @@
if ((stat = WaitForSingleObject(thd->td, INFINITE)) == WAIT_OBJECT_0) {
*retval = thd->exitval;
+#ifndef _WIN32_WCE
+ /* _endthreadex() doesn't close the thread handle. */
+ CloseHandle(thd->td);
+#endif
return APR_SUCCESS;
}
else {