This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
kill 'INT' doesn't work on Windows
[perl5.git] / win32 / win32.c
index 98fbea0..4d8a621 100644 (file)
@@ -1115,6 +1115,11 @@ win32_kill(int pid, int sig)
                if (GenerateConsoleCtrlEvent(CTRL_C_EVENT,pid))
                    return 0;
                break;
+            case SIGBREAK:
+            case SIGTERM:
+                if (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,pid))
+                    return 0;
+                break;
            default: /* For now be backwards compatible with perl5.6 */
            case 9:
                if (TerminateProcess(hProcess, sig)) {
@@ -1139,6 +1144,11 @@ alien_process:
                    if (GenerateConsoleCtrlEvent(CTRL_C_EVENT,pid))
                        retval = 0;
                    break;
+                case SIGBREAK:
+                case SIGTERM:
+                    if (GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT,pid))
+                       retval = 0;
+                    break;
                default: /* For now be backwards compatible with perl5.6 */
                 case 9:
                    if (TerminateProcess(hProcess, sig))