From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:44508) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGrwe-0000lL-8r for qemu-devel@nongnu.org; Wed, 26 Sep 2012 09:46:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TGrwU-0007CG-BI for qemu-devel@nongnu.org; Wed, 26 Sep 2012 09:46:32 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:34705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TGrwU-0007Bu-76 for qemu-devel@nongnu.org; Wed, 26 Sep 2012 09:46:22 -0400 Received: by obbta14 with SMTP id ta14so537573obb.4 for ; Wed, 26 Sep 2012 06:46:20 -0700 (PDT) From: Anthony Liguori In-Reply-To: References: <1348584532-21914-1-git-send-email-mjt@msgid.tls.msk.ru> <876271ol4w.fsf@codemonkey.ws> <5062AA0C.60303@msgid.tls.msk.ru> <5062BA23.705@msgid.tls.msk.ru> Date: Wed, 26 Sep 2012 08:46:16 -0500 Message-ID: <87ehloj3rr.fsf@codemonkey.ws> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH v2] stop using stdio for monitor/serial/etc with -daemonize List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell , Michael Tokarev Cc: Stefan Hajnoczi , Hitoshi Mitake , qemu-devel@nongnu.org Peter Maydell writes: > On 26 September 2012 09:17, Michael Tokarev wrote: >> On 26.09.2012 12:00, Peter Maydell wrote: >> >>>> I know lots of people use -nographic -daemonize to run headless >>>> guests in background (like, for example, a router). I guess it >>>> come way before -vga option has been introduced, but at least I >>>> know about -vga (but not about -vga none). For one, I never saw >>>> -display before. And it looks like -nographic is a synonym for >>>> -display none, and -curses is a synonym for -display curses. >> >> I mean, -nographic is about the same as -vga none -display none. > > ...except that it *also* messes around with where the serial output > goes and with the parallel port and maybe something else. > >> What is equivalent of -nographic in terms of -vga/-display/-...? >> From the code it is something like >> >> -vga none -display none -serial mon:stdio -parallel null > > It's something like that. It would be nice to implement -nographic > as "this is an alias for ...." but IIRC it isn't quite doable. > (maybe I misremember) > >> (this is the code I tried to patch). >> >> Note: this, compbined with -daemonize, also has the same issue, >> namely, the tty is left in a bad state after qemu process backgrounded, >> and for the very same reason: -serial stdio switches the try into >> raw mode. So this should be fixed too -- somehow, either by forbidding >> this combination completely or by silently substituting stdio for >> -serial with null. But it will be done in a subsequent patch. >> >> Note also: by forbidding -nographic -daemonize, we'll break lots of >> existing setups too, and I still don't see why this combination is >> bad, I already demonstrated that it can be made to work in a more >> or less reasonable/expected way. > > Because you've asked both "put me into the background" and "please > send stuff to stdio". Admittedly you've probably done that because > you didn't really understand that '-nographic' doesn't mean > '-display none', but you've still asked for a nonsensical combination. This is a good example of where we need improved documentation but I agree 100% with Peter. Regards, Anthony Liguori > > -- PMM