OSDN Git Service

* pinfo.cc (pinfo::exit): Call ExitProcess if called from signal thread.
authorcgf <cgf>
Fri, 23 Sep 2005 20:05:47 +0000 (20:05 +0000)
committercgf <cgf>
Fri, 23 Sep 2005 20:05:47 +0000 (20:05 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/pinfo.cc

index c34f37e..98bd9f3 100644 (file)
@@ -1,5 +1,10 @@
 2005-09-23  Christopher Faylor  <cgf@timesys.com>
 
+       * pinfo.cc (pinfo::exit): Call ExitProcess if called from signal
+       thread.
+
+2005-09-23  Christopher Faylor  <cgf@timesys.com>
+
        * pinfo.cc (pinfo::exit): Eliminate use of _my_tls.thread_handle.
        * tlsoffsets.h: Regenerate.
 
index 59eb652..2a5f47c 100644 (file)
@@ -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