diff options
-rw-r--r-- | qemu-char.c | 6 | ||||
-rw-r--r-- | qemu-config.c | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/qemu-char.c b/qemu-char.c index 0fd402c46d..23d2a07109 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -729,7 +729,7 @@ static void term_exit(void) fcntl(0, F_SETFL, old_fd0_flags); } -static void term_init(void) +static void term_init(QemuOpts *opts) { struct termios tty; @@ -742,7 +742,7 @@ static void term_init(void) tty.c_oflag |= OPOST; tty.c_lflag &= ~(ECHO|ECHONL|ICANON|IEXTEN); /* if graphical mode, we allow Ctrl-C handling */ - if (display_type == DT_NOGRAPHIC) + if (!qemu_opt_get_bool(opts, "signal", display_type != DT_NOGRAPHIC)) tty.c_lflag &= ~ISIG; tty.c_cflag &= ~(CSIZE|PARENB); tty.c_cflag |= CS8; @@ -775,7 +775,7 @@ static CharDriverState *qemu_chr_open_stdio(QemuOpts *opts) chr->chr_close = qemu_chr_close_stdio; qemu_set_fd_handler2(0, stdio_read_poll, stdio_read, NULL, chr); stdio_nb_clients++; - term_init(); + term_init(opts); return chr; } diff --git a/qemu-config.c b/qemu-config.c index cae92f78cf..fc73beaef6 100644 --- a/qemu-config.c +++ b/qemu-config.c @@ -134,6 +134,9 @@ QemuOptsList qemu_chardev_opts = { },{ .name = "mux", .type = QEMU_OPT_BOOL, + },{ + .name = "signal", + .type = QEMU_OPT_BOOL, }, { /* end if list */ } }, |