diff options
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/cygtls.cc | 21 |
2 files changed, 17 insertions, 9 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 0e1a78eea..e3f1104b3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2005-04-05 Christopher Faylor <cgf@timesys.com> + * cygtls.cc (_cygtls::remove): Don't free or close stuff if we're being + called in a "non-standard" way. + +2005-04-05 Christopher Faylor <cgf@timesys.com> + * sync.h (muto::initforce): Delete flawed implementation. * pwdgrp.h (pwdgrp::pglock): Make static. * grp.cc (pwdgrp::pwdgrp): Eliminate use of initforce. diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index b4ca01b44..7b8c560ce 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -165,15 +165,18 @@ _cygtls::remove (DWORD wait) debug_printf ("wait %p", wait); if (!locals.exitsock) return; - // FIXME: Need some sort of atthreadexit function to allow things like - // select to control this themselves - if (locals.exitsock != INVALID_SOCKET) - closesocket (locals.exitsock); - free_local (process_ident); - free_local (ntoa_buf); - free_local (protoent_buf); - free_local (servent_buf); - free_local (hostent_buf); + if (wait) + { + // FIXME: Need some sort of atthreadexit function to allow things like + // select to control this themselves + if (locals.exitsock != INVALID_SOCKET) + closesocket (locals.exitsock); + free_local (process_ident); + free_local (ntoa_buf); + free_local (protoent_buf); + free_local (servent_buf); + free_local (hostent_buf); + } do { |