From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45938) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsX5E-00011V-VP for qemu-devel@nongnu.org; Fri, 28 Jun 2013 07:43:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UsX5C-00024x-T9 for qemu-devel@nongnu.org; Fri, 28 Jun 2013 07:43:20 -0400 Received: from isrv.corpit.ru ([86.62.121.231]:42818) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UsX5C-00024h-Mn for qemu-devel@nongnu.org; Fri, 28 Jun 2013 07:43:18 -0400 Message-ID: <51CD76D5.2050709@msgid.tls.msk.ru> Date: Fri, 28 Jun 2013 15:43:17 +0400 From: Michael Tokarev MIME-Version: 1.0 References: <1371645291-3178-1-git-send-email-mjt@msgid.tls.msk.ru> <51CD73A4.2050107@msgid.tls.msk.ru> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] display: stop using DT_NOGRAPHIC, use DT_NONE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Paolo Bonzini , Anthony Liguori , "Todd T. Fries" , qemu-devel@nongnu.org 28.06.2013 15:34, Peter Maydell wrote: > On 28 June 2013 12:29, Michael Tokarev wrote: >> 28.06.2013 15:24, Peter Maydell wrote: >>> ...in particular I don't think "-display none" should >>> mean "don't allow ctrl-c" (though -nographic should >>> continue to have that effect), and this patch currently >>> introduces that behaviour change. >> >> As Anthony said before, -nographic is legacy. So there should >> be some more modern way to control this. That's exactly the >> change which I don't like myself. But "don't allow ctrl-c" >> which is currently bound to -nographic is equally wrong. > > All I'm saying is that I use -display none and I like that > it defaults to "ctrl-c works and kills qemu" and I don't > want you to break that :-) I'm not. Code in qemu-char.c: static bool stdio_allow_signal; static void qemu_chr_set_echo_stdio(CharDriverState *chr, bool echo) { ... /* if graphical mode, we allow Ctrl-C handling */ if (!stdio_allow_signal) tty.c_lflag &= ~ISIG; ... } static CharDriverState *qemu_chr_open_stdio(ChardevStdio *opts) { ... stdio_allow_signal = display_type != DT_NOGRAPHIC; if (opts->has_signal) { stdio_allow_signal = opts->signal; } ... } Note it is used only for stdio char device, like -serial stdio, so if you _just_ use -display none, without -serial stdio, you wont notice a change. And note that original intention isn't exactly clear, either. How it is related with, say, curses display which needs raw keypresses? Adding Paolo who wrote that code in bb002513. Thanks, /mjt