Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)

2012-10-31 Thread Stefan Hajnoczi
On Mon, Oct 29, 2012 at 04:26:58PM +0400, Michael Tokarev wrote: 29.10.2012 13:18, Stefan Hajnoczi wrote: 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

Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)

2012-10-29 Thread Stefan Hajnoczi
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()) { +/*

Re: [Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)

2012-10-29 Thread Michael Tokarev
29.10.2012 13:18, Stefan Hajnoczi wrote: 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; }

[Qemu-devel] [PATCH] disallow -daemonize usage of stdio (curses display, -nographic, -serial stdio etc)

2012-10-27 Thread Michael Tokarev
Curses display requires stdin/out to stay on the terminal, so -daemonize makes no sense in this case. Instead of leaving display uninitialized like is done since 995ee2bf469de6bb, explicitly detect this case earlier and error out. -nographic can actually be used with -daemonize, by redirecting