]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
expect.c (__gnat_kill): Implement the SIGINT signal on Windows.
authorPascal Obry <obry@adacore.com>
Thu, 13 Dec 2007 10:26:21 +0000 (11:26 +0100)
committerArnaud Charlet <charlet@gcc.gnu.org>
Thu, 13 Dec 2007 10:26:21 +0000 (11:26 +0100)
2007-12-06  Pascal Obry  <obry@adacore.com>

* 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

index a9092328281ee55832c5109c098b6219aa27fb25..aa18a3394818c7db8602c48f87dfdd11c70ec4d0 100644 (file)
@@ -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