diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index c34f37e83..98bd9f328 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-09-23 Christopher Faylor + + * pinfo.cc (pinfo::exit): Call ExitProcess if called from signal + thread. + 2005-09-23 Christopher Faylor * pinfo.cc (pinfo::exit): Eliminate use of _my_tls.thread_handle. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 59eb65207..2a5f47c9f 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -172,7 +172,10 @@ pinfo::exit (DWORD n) _my_tls.stackptr = _my_tls.stack; sigproc_printf ("Calling ExitThread hProcess %p, n %p, exitcode %p", hProcess, n, exitcode); - ExitThread (exitcode); + if (&_my_tls == _sig_tls) + ExitProcess (exitcode); + else + ExitThread (exitcode); } # undef self