Skip to content

Commit 7506f83

Browse files
author
manojampalam
committed
Fixed regression around executing Ctrl+C in session with TTY
1 parent f7797b4 commit 7506f83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/win32/win32compat/shell-host.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ DWORD WINAPI ProcessPipes(LPVOID p) {
826826
INPUT_RECORD ir;
827827

828828
if (buf[i] == 3) {/*Ctrl+C - Raise Ctrl+C*/
829-
GenerateConsoleCtrlEvent(CTRL_C_EVENT, childProcessId);
829+
GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);
830830
continue;
831831
}
832832

@@ -1111,6 +1111,7 @@ int start_with_pty(int ac, wchar_t **av) {
11111111
av++;
11121112
}
11131113

1114+
SetConsoleCtrlHandler(NULL, FALSE);
11141115
GOTO_CLEANUP_ON_FALSE(CreateProcess(NULL, cmd, NULL, NULL, TRUE, CREATE_NEW_CONSOLE,
11151116
NULL, NULL, &si, &pi));
11161117
childProcessId = pi.dwProcessId;

0 commit comments

Comments
 (0)