diff options
author | Christopher Faylor <me@cgf.cx> | 2006-01-02 03:14:56 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-01-02 03:14:56 +0000 |
commit | 3bfd1c5e8c80af4bb863133ae76b802b71695ed5 (patch) | |
tree | c7af5037921d8f208a7193138154c4c8e8d9e4f9 | |
parent | 68f62c98f922fa32909af95a4aebb6b4b021679f (diff) | |
download | newlib-3bfd1c5e8c80af4bb863133ae76b802b71695ed5.zip newlib-3bfd1c5e8c80af4bb863133ae76b802b71695ed5.tar.gz newlib-3bfd1c5e8c80af4bb863133ae76b802b71695ed5.tar.bz2 |
* pinfo.cc (pinfo::exit): Swap signal and normal exit value when not started
from a cygwin process - just like the good-old-days of B20.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/pinfo.cc | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 498c385..1ed4182 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2006-01-01 Christopher Faylor <cgf@timesys.com> + * pinfo.cc (pinfo::exit): Swap signal and normal exit value when not + started from a cygwin process - just like the good-old-days of B20. + +2006-01-01 Christopher Faylor <cgf@timesys.com> + * strace.cc (strace::write_childpid): Remove debugging output. 2006-01-01 Christopher Faylor <cgf@timesys.com> diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 84d326b..5773884 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -158,7 +158,7 @@ pinfo::exit (DWORD n) add_rusage (&self->rusage_self, &r); int exitcode = self->exitcode & 0xffff; if (!self->cygstarted) - exitcode >>= 8; + exitcode = ((exitcode & 0xff) << 8) | ((exitcode >> 8) & 0xff); sigproc_printf ("Calling ExitProcess n %p, exitcode %p", n, exitcode); ExitProcess (exitcode); } |