From 3bfd1c5e8c80af4bb863133ae76b802b71695ed5 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 2 Jan 2006 03:14:56 +0000 Subject: * 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. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/pinfo.cc | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'winsup') diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 498c38539..1ed4182f2 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2006-01-01 Christopher Faylor + + * 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 * strace.cc (strace::write_childpid): Remove debugging output. diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 84d326b3e..5773884c3 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); } -- cgit v1.2.3