* [Qemu-devel] Bug/Inconvenience report
@ 2004-08-17 20:26 Johannes Martin
2004-08-18 10:21 ` [Qemu-devel] " Mark Jonckheere
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Martin @ 2004-08-17 20:26 UTC (permalink / raw)
To: qemu-devel
Hi,
when qemu crashes, it usually leaves the console window in a state where
input isn't echoed to the terminal, i.e. you don't see what you type any
more. /usr/bin/reset fixes this.
Also, if qemu had grabbed the mouse before crashing, the mouse will be
stuck after the crash or disappear completely. Restarting qemu and
grabbing/degrabbing will fix this.
Would it be possible to install some signal handlers and/or atexit()
routines to restore console and mouse settings on unexpected failures?
Thanks
Johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Qemu-devel] Re: Bug/Inconvenience report
2004-08-17 20:26 [Qemu-devel] Bug/Inconvenience report Johannes Martin
@ 2004-08-18 10:21 ` Mark Jonckheere
0 siblings, 0 replies; 2+ messages in thread
From: Mark Jonckheere @ 2004-08-18 10:21 UTC (permalink / raw)
To: qemu-devel
Johannes Martin wrote:
> Hi,
>
> when qemu crashes, it usually leaves the console window in a state where
> input isn't echoed to the terminal, i.e. you don't see what you type any
> more. /usr/bin/reset fixes this.
I propose a small patch to change the console tty settings
only when qemu uses the console for input/output.
----------------------------------------------->8--
diff -wurb qemu/vl.c qemu-patched/vl.c
--- qemu/vl.c Wed Aug 4 00:09:30 2004
+++ qemu-patched/vl.c Wed Aug 4 12:53:38 2004
@@ -1467,6 +1467,8 @@
static void term_exit(void)
{
+ if (stdio_nb_clients == 0)
+ return;
tcsetattr (0, TCSANOW, &oldtty);
fcntl(0, F_SETFL, old_fd0_flags);
}
@@ -1475,6 +1477,8 @@
{
struct termios tty;
+ if (stdio_nb_clients == 0)
+ return;
tcgetattr (0, &tty);
oldtty = tty;
old_fd0_flags = fcntl(0, F_GETFL);
----------------------------------------------->8--
This patch enables qemu to run as a background process.
It initialises the current terminal only when serial-
or monitor-I/O is redirected to stdin/stdout or when
-nographic is selected. Without this patch, the program
hangs in the term_init() and term_exit() functions when
running as a background process.
examples:
qemu -hda disk.img &
xinit /usr/local/bin/qemu -hda disk.img -- :1 &
The second example launches qemu with a second X server
and permits to switch between host and guest operating
systems using ctrl-alt-F7 and ctrl-alt-F8.
>
> Also, if qemu had grabbed the mouse before crashing, the mouse will be
> stuck after the crash or disappear completely. Restarting qemu and
> grabbing/degrabbing will fix this.
Even worse is working in full-screen mode before a crash.
>
> Would it be possible to install some signal handlers and/or atexit()
> routines to restore console and mouse settings on unexpected failures?
and returning from full-screen mode.
>
> Thanks
> Johannes
Mark Jonckheere
--
:wq
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-08-18 10:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-17 20:26 [Qemu-devel] Bug/Inconvenience report Johannes Martin
2004-08-18 10:21 ` [Qemu-devel] " Mark Jonckheere
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).