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 <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Cc: Anthony Liguori <[email protected]>
Cc: Michael Roth <[email protected]>
Signed-off-by: Hitoshi Mitake <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>