aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-01-31 14:34:07 +0000
committerChristopher Faylor <me@cgf.cx>2005-01-31 14:34:07 +0000
commitad1d82b8519898e0a41be6dda97607f665d806a4 (patch)
tree9c96ef30e81648c73c462fd81166cc9a5a26073f
parent6d336c0e5a511e8e827ea9c0f75a7f231b571eaf (diff)
downloadnewlib-ad1d82b8519898e0a41be6dda97607f665d806a4.zip
newlib-ad1d82b8519898e0a41be6dda97607f665d806a4.tar.gz
newlib-ad1d82b8519898e0a41be6dda97607f665d806a4.tar.bz2
* pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/pinfo.cc2
2 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 8e43421..dc23ecf 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2005-01-31 Christopher Faylor <cgf@timesys.com>
+
+ * pinfo.cc (pinfo::exit): Only return low-order 16 bits when exiting.
+
2005-01-31 Corinna Vinschen <corinna@vinschen.de>
* fhandler_process.cc (format_process_maps): Get destbuf argument by
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 6df0f5e..1c67f87 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -159,7 +159,7 @@ pinfo::exit (DWORD n)
_my_tls.stackptr = _my_tls.stack;
sigproc_printf ("Calling ExitProcess hProcess %p, n %p, exitcode %p",
hProcess, n, exitcode);
- ExitProcess (exitcode);
+ ExitProcess (exitcode & 0xffff);
}
# undef self