From: Pascal Obry Date: Thu, 13 Dec 2007 10:26:21 +0000 (+0100) Subject: expect.c (__gnat_kill): Implement the SIGINT signal on Windows. X-Git-Tag: releases/gcc-4.3.0~1060 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=38386aaec109fea3f18074d81894ae16452e47ff;p=thirdparty%2Fgcc.git 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 --- 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