diff options
author | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-25 11:22:09 +0000 |
---|---|---|
committer | ted.mielczarek <ted.mielczarek@4c0a9323-5329-0410-9bdc-e9ce6186880e> | 2012-04-25 11:22:09 +0000 |
commit | 24c3c97633f691fdf2a3467f63aedde19bf8fec1 (patch) | |
tree | f4a1716bd787e6471e859f9349c9a6b2f267a8dc /src/client/linux/handler | |
parent | Reap child in VerifyStackReadWithMultipleThreads (diff) | |
download | breakpad-24c3c97633f691fdf2a3467f63aedde19bf8fec1.tar.xz |
Fix compilation warnings related to unchecked return values
Patch by Chris Dearman <chris@mips.com>
R=benchan at http://breakpad.appspot.com/377001
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@957 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/handler')
-rw-r--r-- | src/client/linux/handler/exception_handler_unittest.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/linux/handler/exception_handler_unittest.cc b/src/client/linux/handler/exception_handler_unittest.cc index 84fc08ed..6fcf251b 100644 --- a/src/client/linux/handler/exception_handler_unittest.cc +++ b/src/client/linux/handler/exception_handler_unittest.cc @@ -669,7 +669,14 @@ CrashHandler(const void* crash_context, size_t crash_context_size, void* context) { const int fd = (intptr_t) context; int fds[2]; - pipe(fds); + if (pipe(fds) == -1) { + // There doesn't seem to be any way to reliably handle + // this failure without the parent process hanging + // At least make sure that this process doesn't access + // unexpected file descriptors + fds[0] = -1; + fds[1] = -1; + } struct kernel_msghdr msg = {0}; struct kernel_iovec iov; iov.iov_base = const_cast<void*>(crash_context); |