diff options
author | Christopher Faylor <me@cgf.cx> | 2005-01-29 03:09:50 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-01-29 03:09:50 +0000 |
commit | 02e221b774df967ea766df431f3efdb992eb0be2 (patch) | |
tree | 6b648b68463947b1cb48a0474e93d3453b769a81 /winsup/cygwin | |
parent | 0eefa5256bd80d73fe7116cc77ad84418848eb11 (diff) | |
download | cygnal-02e221b774df967ea766df431f3efdb992eb0be2.tar.gz cygnal-02e221b774df967ea766df431f3efdb992eb0be2.tar.bz2 cygnal-02e221b774df967ea766df431f3efdb992eb0be2.zip |
* cygtls.cc (cygtls::call2): Move socket cleanup.
(cygtls::remove): Move socket cleanup here. Don't use _my_tls to reference it.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r-- | winsup/cygwin/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/cygwin/cygtls.cc | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 7ee641fe3..bd8363165 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2005-01-28 Christopher Faylor <cgf@timesys.com> + + * cygtls.cc (cygtls::call2): Move socket cleanup. + (cygtls::remove): Move socket cleanup here. Don't use _my_tls to + reference it. + 2005-01-26 Christopher Faylor <cgf@timesys.com> * pinfo.cc (pinfo::init): Avoid a compiler warning. diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index 22db63683..9f0c97a58 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -91,10 +91,6 @@ _cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf) _my_tls.init_thread (buf, func); DWORD res = func (arg, buf); _my_tls.remove (INFINITE); - // FIXME: Need some sort of atthreadexit function to allow things like - // select to control this themselves - if (_my_tls.locals.exitsock != INVALID_SOCKET) - closesocket (_my_tls.locals.exitsock); ExitThread (res); } @@ -156,6 +152,10 @@ void _cygtls::remove (DWORD wait) { debug_printf ("wait %p\n", wait); + // FIXME: Need some sort of atthreadexit function to allow things like + // select to control this themselves + if (_my_tls.locals.exitsock != INVALID_SOCKET) + closesocket (locals.exitsock); do { sentry here (wait); |