aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-23 20:05:50 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-23 20:05:50 +0000
commit0017e7267558096c7d00f573a719b80afb52d9eb (patch)
treead0a6c63f878897ec9234476eec564ecff34c65d
parente68bd70ab47c06b503547511fbe19b165f78e4d5 (diff)
downloadnewlib-0017e7267558096c7d00f573a719b80afb52d9eb.zip
newlib-0017e7267558096c7d00f573a719b80afb52d9eb.tar.gz
newlib-0017e7267558096c7d00f573a719b80afb52d9eb.tar.bz2
* pinfo.cc (pinfo::exit): Call ExitProcess if called from signal thread.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/pinfo.cc5
2 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c34f37e..98bd9f3 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 59eb652..2a5f47c 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