* [Qemu-devel] [PATCH v2] oslib: make error handling more reasonable
@ 2012-02-10 15:13 Zhi Yong Wu
0 siblings, 0 replies; only message in thread
From: Zhi Yong Wu @ 2012-02-10 15:13 UTC (permalink / raw)
To: qemu-devel; +Cc: Zhi Yong Wu, stefanha
From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
---
oslib-posix.c | 4 ++--
oslib-win32.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/oslib-posix.c b/oslib-posix.c
index b6a3c7f..3b7cd9d 100644
--- a/oslib-posix.c
+++ b/oslib-posix.c
@@ -80,7 +80,7 @@ void *qemu_oom_check(void *ptr)
{
if (ptr == NULL) {
fprintf(stderr, "Failed to allocate memory: %s\n", strerror(errno));
- abort();
+ _Exit(EXIT_FAILURE);
}
return ptr;
}
@@ -94,7 +94,7 @@ void *qemu_memalign(size_t alignment, size_t size)
if (ret != 0) {
fprintf(stderr, "Failed to allocate %zu B: %s\n",
size, strerror(ret));
- abort();
+ _Exit(EXIT_FAILURE);
}
#elif defined(CONFIG_BSD)
ptr = qemu_oom_check(valloc(size));
diff --git a/oslib-win32.c b/oslib-win32.c
index ce3021e..67b82d3 100644
--- a/oslib-win32.c
+++ b/oslib-win32.c
@@ -35,7 +35,7 @@ void *qemu_oom_check(void *ptr)
{
if (ptr == NULL) {
fprintf(stderr, "Failed to allocate memory: %lu\n", GetLastError());
- abort();
+ _Exit(EXIT_FAILURE);
}
return ptr;
}
--
1.7.6
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-10 15:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 15:13 [Qemu-devel] [PATCH v2] oslib: make error handling more reasonable Zhi Yong Wu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).