Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-03-03 03:36:49 +0300
committerChristopher Faylor <me@cgf.cx>2005-03-03 03:36:49 +0300
commit55b670024ce220b4be27a6f62849aba3204b09f0 (patch)
treec10ace622f5f8f43e7e94ea68c9d7d540e4c4b26
parentd845acc8d293a0058441dbe3b04336c0c90184d1 (diff)
* cygtls.cc (_cygtls::remove): Don't attempt any removal activities if exitsock
is zero.
-rw-r--r--winsup/cygwin/ChangeLog6
-rw-r--r--winsup/cygwin/cygtls.cc4
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index aa6b2e455..3e8218771 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,6 +1,12 @@
2005-03-02 Christopher Faylor <cgf@timesys.com>
* 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.
(_cygtls::remove): Detect zero exitsock. Not quite sure why this is needed.
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc
index cb5379526..29047dff5 100644
--- a/winsup/cygwin/cygtls.cc
+++ b/winsup/cygwin/cygtls.cc
@@ -152,9 +152,11 @@ void
_cygtls::remove (DWORD wait)
{
debug_printf ("wait %p\n", wait);
+ if (!locals.exitsock)
+ return;
// FIXME: Need some sort of atthreadexit function to allow things like
// select to control this themselves
- if (locals.exitsock && locals.exitsock != INVALID_SOCKET)
+ if (locals.exitsock != INVALID_SOCKET)
closesocket (locals.exitsock);
do
{