28.06.2013 15:34, Peter Maydell wrote: > On 28 June 2013 12:29, Michael Tokarev <m...@tls.msk.ru> 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