]> Git Repo - qemu.git/blobdiff - qemu-char.c
Revert "Convert atexit users to exit_notifier"
[qemu.git] / qemu-char.c
index c02dfae43a57bbf36e238fc9f7925054738ae064..a3d6e6496701f66ec30b509a32160c086c29f941 100644 (file)
@@ -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);
 }
This page took 0.023926 seconds and 4 git commands to generate.