From: Jan Dubois <jand@activestate.com>
Date: Fri, 8 Aug 2003 17:49:03 +0000 (-0700)
Subject: kill 'INT' doesn't work on Windows
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9e200fca2469be3038fc6b7efd81a14847a83256;p=p5sagit%2Fp5-mst-13.2.git

kill 'INT' doesn't work on Windows
Message-ID: <ite8jvgjgcfm8e9dhl6f4dtstrbmn1vmpk@4ax.com>

p4raw-id: //depot/perl@20572
---

diff --git a/win32/win32.c b/win32/win32.c
index 98fbea0..4d8a621 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -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))