mirror of
https://github.com/mii443/qemu.git
synced 2025-09-01 14:49:23 +00:00
Revert "Convert atexit users to exit_notifier"
This reverts commit d7234f4d7e
.
Conflicts:
hw/xen_machine_pv.c
This should have never been committed.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
11
qemu-char.c
11
qemu-char.c
@ -713,15 +713,9 @@ static void term_exit(void)
|
||||
fcntl(0, F_SETFL, old_fd0_flags);
|
||||
}
|
||||
|
||||
static void term_exit_notifier(Notifier *notifier)
|
||||
{
|
||||
term_exit();
|
||||
}
|
||||
|
||||
static void term_init(QemuOpts *opts)
|
||||
{
|
||||
struct termios tty;
|
||||
static Notifier exit_notifier = { .notify = term_exit_notifier };
|
||||
|
||||
tcgetattr (0, &tty);
|
||||
oldtty = tty;
|
||||
@ -741,9 +735,8 @@ static void term_init(QemuOpts *opts)
|
||||
|
||||
tcsetattr (0, TCSANOW, &tty);
|
||||
|
||||
if (!term_atexit_done++) {
|
||||
exit_notifier_add(&exit_notifier);
|
||||
}
|
||||
if (!term_atexit_done++)
|
||||
atexit(term_exit);
|
||||
|
||||
fcntl(0, F_SETFL, O_NONBLOCK);
|
||||
}
|
||||
|
Reference in New Issue
Block a user