* cygtls.cc (_cygtls::remove): Always close sockevt handle.

This commit is contained in:
Corinna Vinschen 2011-04-18 15:51:54 +00:00
parent ab4c946e4c
commit 1d8170bdfa
2 changed files with 6 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2011-04-18 Corinna Vinschen <corinna@vinschen.de>
* cygtls.cc (_cygtls::remove): Always close sockevt handle.
2011-04-18 Corinna Vinschen <corinna@vinschen.de>
* cygwin.din (ppoll): Export.

View File

@ -146,13 +146,14 @@ _cygtls::remove (DWORD wait)
return;
debug_printf ("wait %p", wait);
if (locals.select.sockevt)
CloseHandle (locals.select.sockevt);
if (wait)
{
/* FIXME: Need some sort of atthreadexit function to allow things like
select to control this themselves. */
if (locals.select.sockevt)
{
CloseHandle (locals.select.sockevt);
locals.select.sockevt = NULL;
free_local (select.ser_num);
free_local (select.w4);