* cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.

This commit is contained in:
Christopher Faylor 2006-05-31 02:14:17 +00:00
parent 08a968173b
commit a2b6c06546
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2006-05-30 Christopher Faylor <cgf@timesys.com>
* cygtls.cc (_cygtls::call2): Don't call ExitThread on the main thread.
2006-05-29 Christopher Faylor <cgf@timesys.com>
* winf.h (MAXCYGWINCMDLEN): Set down size to 30000 or suffer fork

View File

@ -73,6 +73,9 @@ _cygtls::call2 (DWORD (*func) (void *, void *), void *arg, void *buf)
init_thread (buf, func);
DWORD res = func (arg, buf);
remove (INFINITE);
/* Don't call ExitThread on the main thread since we may have been
dynamically loaded. */
if (this != _main_tls)
ExitThread (res);
}