Abort on thread layer errors
authorJan Kiszka <jan.kiszka@siemens.com>
Wed, 21 Sep 2011 07:28:31 +0000 (09:28 +0200)
committerStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
Wed, 21 Sep 2011 09:50:10 +0000 (10:50 +0100)
Makes it easier to catch the bug in gdb as there is no need to set an
explicit breakpoint.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
qemu-thread-posix.c
qemu-thread-win32.c

index 2bd02efeff36bc3ed0143f6d1012c3ddf77fec8d..ac3c0c9d14b81024b470a2f6ee4af14fbbcc2c1a 100644 (file)
@@ -22,7 +22,7 @@
 static void error_exit(int err, const char *msg)
 {
     fprintf(stderr, "qemu: %s: %s\n", msg, strerror(err));
-    exit(1);
+    abort();
 }
 
 void qemu_mutex_init(QemuMutex *mutex)
index a27332e669fffe0f20e98acfd31a1577c3ebb0d1..db8e744729b8e078888a1ded7a5bb45cdf0a0f97 100644 (file)
@@ -24,7 +24,7 @@ static void error_exit(int err, const char *msg)
                   NULL, err, 0, (LPTSTR)&pstr, 2, NULL);
     fprintf(stderr, "qemu: %s: %s\n", msg, pstr);
     LocalFree(pstr);
-    exit(1);
+    abort();
 }
 
 void qemu_mutex_init(QemuMutex *mutex)