From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MynQV-00073J-0P for qemu-devel@nongnu.org; Fri, 16 Oct 2009 10:05:03 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MynQQ-0006x5-9W for qemu-devel@nongnu.org; Fri, 16 Oct 2009 10:05:02 -0400 Received: from [199.232.76.173] (port=42707 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MynQP-0006wm-Vq for qemu-devel@nongnu.org; Fri, 16 Oct 2009 10:04:58 -0400 Received: from mail-ew0-f211.google.com ([209.85.219.211]:35034) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MynQP-0002jr-Da for qemu-devel@nongnu.org; Fri, 16 Oct 2009 10:04:57 -0400 Received: by ewy7 with SMTP id 7so1507799ewy.34 for ; Fri, 16 Oct 2009 07:04:56 -0700 (PDT) Message-ID: <4AD87D83.5040707@codemonkey.ws> Date: Fri, 16 Oct 2009 09:04:51 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Add chardev option to disable signal. References: <20091016133139.9D5E715C033@msa104.auone-net.jp> In-Reply-To: <20091016133139.9D5E715C033@msa104.auone-net.jp> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kusanagi Kouichi Cc: qemu-devel@nongnu.org Kusanagi Kouichi wrote: > If I am using vga and serial which is stdio and hit C-c on > serial console, qemu terminates. That is annoying for me. > So make it configurable whether signal is generated when C-c is hit. > > Signed-off-by: Kusanagi Kouichi > --- > qemu-char.c | 6 +++--- > qemu-config.c | 3 +++ > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/qemu-char.c b/qemu-char.c > index 8084a67..dd23e63 100644 > --- a/qemu-char.c > +++ b/qemu-char.c > @@ -727,7 +727,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; > > @@ -740,7 +740,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; > Would be nice to eliminate the DT_NOGRAPHIC check here. In fact, looking at the other nographic check, they look bogus. So how about eliminating DT_NOGRAPHIC entirely and replacing it with DT_NONE + appropriate serial config? Regards, Anthony Liguori