[newlib-cygwin] Cygwin: pty: Prevent the helper process from exiting by Ctrl-C.

Ken Brown kbrown@sourceware.org
Sat Sep 14 15:25:00 GMT 2019


https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=cac5f8781a7bfb21e7e0bd938ac235d5063166c8

commit cac5f8781a7bfb21e7e0bd938ac235d5063166c8
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date:   Mon Sep 9 21:08:20 2019 +0900

    Cygwin: pty: Prevent the helper process from exiting by Ctrl-C.

Diff:
---
 winsup/utils/cygwin-console-helper.cc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/winsup/utils/cygwin-console-helper.cc b/winsup/utils/cygwin-console-helper.cc
index ad451ec..66004bd 100644
--- a/winsup/utils/cygwin-console-helper.cc
+++ b/winsup/utils/cygwin-console-helper.cc
@@ -10,6 +10,7 @@ main (int argc, char **argv)
   SetEvent (h);
   if (argc == 4) /* Pseudo console helper mode for PTY */
     {
+      SetConsoleCtrlHandler (NULL, TRUE);
       HANDLE hPipe = (HANDLE) strtoull (argv[3], &end, 0);
       char buf[64];
       sprintf (buf, "StdHandles=%p,%p\n",



More information about the Cygwin-cvs mailing list