From: Mark Jonckheere <mark.jonckheere@easynet.be>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: Bug/Inconvenience report
Date: Wed, 18 Aug 2004 12:21:57 +0200 [thread overview]
Message-ID: <41232DC5.7040205@easynet.be> (raw)
In-Reply-To: Pine.LNX.4.56.0408172222290.1927@hatatitla.NotaMusica.com
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
prev parent reply other threads:[~2004-08-18 10:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 20:26 [Qemu-devel] Bug/Inconvenience report Johannes Martin
2004-08-18 10:21 ` Mark Jonckheere [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41232DC5.7040205@easynet.be \
--to=mark.jonckheere@easynet.be \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.