summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chardev/char-win-stdio.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/chardev/char-win-stdio.c b/chardev/char-win-stdio.c
index a4771ab82e..eb830eabd9 100644
--- a/chardev/char-win-stdio.c
+++ b/chardev/char-win-stdio.c
@@ -146,6 +146,8 @@ static void qemu_chr_open_stdio(Chardev *chr,
bool *be_opened,
Error **errp)
{
+ ChardevStdio *opts = backend->u.stdio.data;
+ bool stdio_allow_signal = !opts->has_signal || opts->signal;
WinStdioChardev *stdio = WIN_STDIO_CHARDEV(chr);
DWORD dwMode;
int is_console = 0;
@@ -193,7 +195,11 @@ static void qemu_chr_open_stdio(Chardev *chr,
if (is_console) {
/* set the terminal in raw mode */
/* ENABLE_QUICK_EDIT_MODE | ENABLE_EXTENDED_FLAGS */
- dwMode |= ENABLE_PROCESSED_INPUT;
+ if (stdio_allow_signal) {
+ dwMode |= ENABLE_PROCESSED_INPUT;
+ } else {
+ dwMode &= ~ENABLE_PROCESSED_INPUT;
+ }
}
SetConsoleMode(stdio->hStdIn, dwMode);