mirror of
https://github.com/Motorhead1991/qemu.git
synced 2026-01-06 06:27:41 -07:00
The stdio chardev finalize method calls term_exit() to restore the original terminal settings that were saved in the "oldtty" global. If the qemu_chr_open_stdio() method exited with an error, we might not have any original terminal settings saved in "oldtty" yet. eg $ qemu-system-x86_64 -monitor stdio -daemonize qemu-system-x86_64: -monitor stdio: cannot use stdio with -daemonize will cause QEMU to splatter the terminal settings with an all-zeros "struct termios", with predictably unpleasant results. Fortunately the existing "stdio_in_use" flag is suitable witness for whether "oldtty" contains settings that need restoring. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20180604123043.13985-1-berrange@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> |
||
|---|---|---|
| .. | ||
| baum.c | ||
| char-console.c | ||
| char-fd.c | ||
| char-fe.c | ||
| char-file.c | ||
| char-io.c | ||
| char-mux.c | ||
| char-null.c | ||
| char-parallel.c | ||
| char-pipe.c | ||
| char-pty.c | ||
| char-ringbuf.c | ||
| char-serial.c | ||
| char-socket.c | ||
| char-stdio.c | ||
| char-udp.c | ||
| char-win-stdio.c | ||
| char-win.c | ||
| char.c | ||
| Makefile.objs | ||
| msmouse.c | ||
| spice.c | ||
| testdev.c | ||
| trace-events | ||
| wctablet.c | ||