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
This commit is contained in:
ted.mielczarek 2012-04-25 11:22:09 +00:00
parent 258f2459fc
commit 24c3c97633
3 changed files with 43 additions and 28 deletions

View file

@ -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);