diff options
author | Hitoshi Mitake | 2012-09-14 18:15:41 +0200 |
---|---|---|
committer | Stefan Hajnoczi | 2012-09-23 08:11:28 +0200 |
commit | 995ee2bf469de6bbe5ce133ec853392b2a4ce34c (patch) | |
tree | b52719e4af7b29724889cba00ce1d5ff3d8bce63 /vl.c | |
parent | dtrace backend: add function to reserved words (diff) | |
download | qemu-995ee2bf469de6bbe5ce133ec853392b2a4ce34c.tar.gz qemu-995ee2bf469de6bbe5ce133ec853392b2a4ce34c.tar.xz qemu-995ee2bf469de6bbe5ce133ec853392b2a4ce34c.zip |
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>
Diffstat (limited to 'vl.c')
-rw-r--r-- | vl.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -3657,7 +3657,9 @@ int main(int argc, char **argv, char **envp) break; #if defined(CONFIG_CURSES) case DT_CURSES: - curses_display_init(ds, full_screen); + if (!is_daemonized()) { + curses_display_init(ds, full_screen); + } break; #endif #if defined(CONFIG_SDL) |