Skip to contentSkip to conversation

Abort on thread layer errors

PATCH Applied Jan Kiszka 2 participants 2 messages Sep 21, 2011

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH 1/1 Abort on thread layer errors

Makes it easier to catch the bug in gdb as there is no need to set an explicit breakpoint.

---
 qemu-thread-posix.c |    2 +-
 qemu-thread-win32.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
qemu-thread-posix.c +1 -1
index 2bd02ef..ac3c0c9 100644
@@ -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)
qemu-thread-win32.c +1 -1
index a27332e..db8e744 100644
@@ -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)
Signature · 1 line
1.7.3.4