From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:57925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSlUi-0004hX-ON for qemu-devel@nongnu.org; Mon, 29 Oct 2012 05:18:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSlUd-0003UK-Uq for qemu-devel@nongnu.org; Mon, 29 Oct 2012 05:18:52 -0400 Received: from mail-bk0-f45.google.com ([209.85.214.45]:41791) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSlUd-0003U6-O1 for qemu-devel@nongnu.org; Mon, 29 Oct 2012 05:18:47 -0400 Received: by mail-bk0-f45.google.com with SMTP id jf3so1539563bkc.4 for ; Mon, 29 Oct 2012 02:18:46 -0700 (PDT) Date: Mon, 29 Oct 2012 10:18:41 +0100 From: Stefan Hajnoczi Message-ID: <20121029091841.GD8917@stefanha-thinkpad.redhat.com> References: <1351343715-7446-1-git-send-email-mjt@msgid.tls.msk.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1351343715-7446-1-git-send-email-mjt@msgid.tls.msk.ru> Subject: Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Tokarev Cc: Blue Swirl , Peter Maydell , Hitoshi Mitake , qemu-devel@nongnu.org, Anthony Liguori On Sat, Oct 27, 2012 at 05:15:15PM +0400, Michael Tokarev wrote: > diff --git a/vl.c b/vl.c > index 9f99ef4..db48d62 100644 > --- a/vl.c > +++ b/vl.c > @@ -3413,6 +3413,26 @@ int main(int argc, char **argv, char **envp) > default_sdcard = 0; > } > > + if (is_daemonized()) { > + /* According to documentation and historically, -nographic redirects > + * serial port, parallel port and monitor to stdio, which does not work > + * with -daemonize. We can redirect these to null instead, but since > + * -nographic is legacy, let's just error out. > + */ > + if (display_type == DT_NOGRAPHIC > + /* && (default_parallel || default_serial > + || default_monitor || default_virtcon) */) { Uncomment these? Stefan