Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2022-02-24 15:04:49 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2022-02-25 11:31:35 +0300
commitcb9e68fd9be4fdec25dd340cb94f442c9848f2f2 (patch)
tree33ff8e2a45f67ccacdea73414cd7c12a57ba5398
parent14acfbd42ad0884a6f47ff48024399e7cce9e41a (diff)
Cygwin: pinfo: Fix exit code when non-cygwin app exits by Ctrl-C.
- Previously, if non-cygwin app exits by Ctrl-C, exit code was 0x00007f00. With this patch, the exit code will be 0x00000002, which means process exited by SIGINT.
-rw-r--r--winsup/cygwin/pinfo.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index bce743bfc..bb7c16547 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -156,6 +156,9 @@ pinfo::status_exit (DWORD x)
a lengthy small_printf instead. */
x = SIGBUS;
break;
+ case STATUS_CONTROL_C_EXIT:
+ x = SIGINT;
+ break;
default:
debug_printf ("*** STATUS_%y\n", x);
x = 127 << 8;