There are a couple of places in qemu, where abort() is called.
The most commonly used one is perhaps cpu_abort() which is called
e.g. when a triple fault occures.

As abort() does not call any atexit() function, cleanup is not
performed. This leaves for example the terminal in a state where
the cursor is invisible.

Are there any reasons not to use exit(1) in cpu_abort()?


        Bernhard Kauer
Index: exec.c
===================================================================
RCS file: /sources/qemu/qemu/exec.c,v
retrieving revision 1.103
diff -u -r1.103 exec.c
--- exec.c	1 Jul 2007 18:21:11 -0000	1.103
+++ exec.c	4 Aug 2007 13:07:52 -0000
@@ -1301,7 +1301,7 @@
         fflush(logfile);
         fclose(logfile);
     }
-    abort();
+    exit(1);
 }
 
 CPUState *cpu_copy(CPUState *env)

Reply via email to