diff options
Diffstat (limited to 'winsup/cygwin/cygtls.cc')
-rw-r--r-- | winsup/cygwin/cygtls.cc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/winsup/cygwin/cygtls.cc b/winsup/cygwin/cygtls.cc index 1a2213d1f..c8352adf9 100644 --- a/winsup/cygwin/cygtls.cc +++ b/winsup/cygwin/cygtls.cc @@ -60,8 +60,8 @@ _cygtls::init_thread (void *x, DWORD (*func) (void *, void *)) local_clib._stdin = _GLOBAL_REENT->_stdin; local_clib._stdout = _GLOBAL_REENT->_stdout; local_clib._stderr = _GLOBAL_REENT->_stderr; - local_clib.__sdidinit = _GLOBAL_REENT->__sdidinit ? -1 : 0; - local_clib.__cleanup = _GLOBAL_REENT->__cleanup; + if (_GLOBAL_REENT->__cleanup) + local_clib.__cleanup = _cygtls::cleanup_early; local_clib.__sglue._niobs = 3; local_clib.__sglue._iobs = &_GLOBAL_REENT->__sf[0]; } @@ -149,6 +149,12 @@ _cygtls::remove (DWORD wait) } } +void +_cygtls::cleanup_early (struct _reent *) +{ + /* Do nothing */ +} + #ifdef __x86_64__ void san::leave () { |