* cygtls.cc (_cygtls::remove): Don't attempt any removal activities if exitsock

is zero.
This commit is contained in:
Christopher Faylor 2005-03-03 00:36:49 +00:00
parent d845acc8d2
commit 55b670024c
2 changed files with 9 additions and 1 deletions

View File

@ -1,6 +1,12 @@
2005-03-02 Christopher Faylor <cgf@timesys.com> 2005-03-02 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::init_thread): Move exitsock setting later. It * cygtls.cc (_cygtls::init_thread): Move exitsock setting later. It
2005-03-02 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::remove): Don't attempt any removal activities if
exitsock is zero.
should always be set. should always be set.
(_cygtls::remove): Detect zero exitsock. Not quite sure why this is needed. (_cygtls::remove): Detect zero exitsock. Not quite sure why this is needed.

View File

@ -152,9 +152,11 @@ void
_cygtls::remove (DWORD wait) _cygtls::remove (DWORD wait)
{ {
debug_printf ("wait %p\n", wait); debug_printf ("wait %p\n", wait);
if (!locals.exitsock)
return;
// FIXME: Need some sort of atthreadexit function to allow things like // FIXME: Need some sort of atthreadexit function to allow things like
// select to control this themselves // select to control this themselves
if (locals.exitsock && locals.exitsock != INVALID_SOCKET) if (locals.exitsock != INVALID_SOCKET)
closesocket (locals.exitsock); closesocket (locals.exitsock);
do do
{ {