]> git.ipfire.org Git - thirdparty/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)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Fri, 12 Oct 2012 02:44:20 +0000 (21:44 -0500)
commit57304014425895659dbfd75fea06c6d4183fe03c
tree589db394bfb7526719a2419834babce8d074918c
parentf3e98930787bc1cf21d962dc121448dea713b891
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>
(cherry picked from commit 995ee2bf469de6bbe5ce133ec853392b2a4ce34c)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
os-posix.c
qemu-os-posix.h
qemu-os-win32.h
vl.c