]> git.proxmox.com Git - qemu.git/commit
curses: don't initialize curses when qemu is daemonized
authorHitoshi Mitake <h.mitake@gmail.com>
Fri, 14 Sep 2012 16:15:41 +0000 (01:15 +0900)
committerStefan Hajnoczi <stefanha@gmail.com>
Sun, 23 Sep 2012 06:11:28 +0000 (07:11 +0100)
commit995ee2bf469de6bbe5ce133ec853392b2a4ce34c
treeb52719e4af7b29724889cba00ce1d5ff3d8bce63
parentd8f8a860f2403533fc73f541122c65a34b21e42f
curses: don't initialize curses when qemu is daemonized

Current qemu initializes curses even if -daemonize option is
passed. This cause problem because shell prompt appears without
calling endwin().

This patch adds new function, is_daemonized(), to OS dependent
code. With this function, curses_display_init() can check that qemu is
daemonized or not. If daemonized, curses_display_init() isn't called
and the problem is avoided.

Of course, -daemonize && -curses doesn't make sense. Users shouldn't
pass the arguments at the same time. But the problem is very painful
because Ctrl-C cannot be delivered to the terminal.

Cc: Andrzej Zaborowski <balrog@zabor.org>
Cc: Stefan Hajnoczi <stefanha@gmail.com>
Cc: Anthony Liguori <aliguori@us.ibm.com>
Cc: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Hitoshi Mitake <h.mitake@gmail.com>
Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
os-posix.c
qemu-os-posix.h
qemu-os-win32.h
vl.c