From 38386aaec109fea3f18074d81894ae16452e47ff Mon Sep 17 00:00:00 2001 From: Pascal Obry Date: Thu, 13 Dec 2007 11:26:21 +0100 Subject: [PATCH] expect.c (__gnat_kill): Implement the SIGINT signal on Windows. 2007-12-06 Pascal Obry * expect.c (__gnat_kill) [WIN32]: Implement the SIGINT signal on Windows. This signal is used by gnatmake to kill child processes for example. From-SVN: r130836 --- gcc/ada/expect.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gcc/ada/expect.c b/gcc/ada/expect.c index a9092328281e..aa18a3394818 100644 --- a/gcc/ada/expect.c +++ b/gcc/ada/expect.c @@ -93,6 +93,12 @@ __gnat_kill (int pid, int sig, int close) CloseHandle ((HANDLE)pid); } } + else if (sig == 2) + { + GenerateConsoleCtrlEvent (CTRL_C_EVENT, (HANDLE)pid); + if (close) + CloseHandle ((HANDLE)pid); + } } int -- 2.47.2