Browse Source

Abort on thread layer errors

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>
Jan Kiszka 14 years ago
parent
commit
53380ac37f
2 changed files with 2 additions and 2 deletions
  1. 1 1
      qemu-thread-posix.c
  2. 1 1
      qemu-thread-win32.c

+ 1 - 1
qemu-thread-posix.c

@@ -22,7 +22,7 @@
 static void error_exit(int err, const char *msg)
 static void error_exit(int err, const char *msg)
 {
 {
     fprintf(stderr, "qemu: %s: %s\n", msg, strerror(err));
     fprintf(stderr, "qemu: %s: %s\n", msg, strerror(err));
-    exit(1);
+    abort();
 }
 }
 
 
 void qemu_mutex_init(QemuMutex *mutex)
 void qemu_mutex_init(QemuMutex *mutex)

+ 1 - 1
qemu-thread-win32.c

@@ -24,7 +24,7 @@ static void error_exit(int err, const char *msg)
                   NULL, err, 0, (LPTSTR)&pstr, 2, NULL);
                   NULL, err, 0, (LPTSTR)&pstr, 2, NULL);
     fprintf(stderr, "qemu: %s: %s\n", msg, pstr);
     fprintf(stderr, "qemu: %s: %s\n", msg, pstr);
     LocalFree(pstr);
     LocalFree(pstr);
-    exit(1);
+    abort();
 }
 }
 
 
 void qemu_mutex_init(QemuMutex *mutex)
 void qemu_mutex_init(QemuMutex *mutex)