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-26 09:13:13 +0300
committerTakashi Yano <takashi.yano@nifty.ne.jp>2022-02-28 14:10:02 +0300
commitf6db6f52aeec3a326a216530978ce8a4bea25cf0 (patch)
tree19bff664bf11cb10512f4b363bdef5068abe0d44 /winsup/cygwin/globals.cc
parent15a35758d8490368fedfe595246b100c7af59a11 (diff)
Cygwin: pinfo: Fix exit code for non-cygwin apps which reads console.
- The recent commit "Cygwin: pinfo: Fix exit code when non-cygwin app exits by Ctrl-C." did not fix enough the issue. If a non-cygwin app is reading the console, it will not return STATUS_CONTROL_C_EXIT even if it is terminated by Ctrl-C. As a result, the previous patch does not take effect. This patch solves this issue by setting sigExeced to SIGINT in ctrl_c_handler(). In addition, sigExeced will be cleared if the app does not terminated within predetermined time period. The reason is that the app does not seem to be terminated by the signal sigExeced.
Diffstat (limited to 'winsup/cygwin/globals.cc')
-rw-r--r--winsup/cygwin/globals.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index ac5ad0307..d3a2e11a4 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -20,7 +20,7 @@ HANDLE NO_COPY hProcImpToken;
HANDLE my_wr_proc_pipe;
HMODULE NO_COPY cygwin_hmodule;
HMODULE NO_COPY hntdll;
-int NO_COPY sigExeced;
+LONG NO_COPY sigExeced;
WCHAR windows_system_directory[MAX_PATH];
UINT windows_system_directory_length;
WCHAR system_wow64_directory[MAX_PATH];