From b20b3336c867ae445bbd1d81c00769892273a361 Mon Sep 17 00:00:00 2001 From: "agl@chromium.org" Date: Thu, 13 Aug 2009 17:27:44 +0000 Subject: Linux: fix seccomp sandbox for GCC 4.4 http://codereview.chromium.org/164484 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23318 0039d316-1c4b-4281-b951-d872f2087c98 --- sandbox/linux/seccomp/maps.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sandbox/linux') diff --git a/sandbox/linux/seccomp/maps.cc b/sandbox/linux/seccomp/maps.cc index 606b65d..68bea96 100644 --- a/sandbox/linux/seccomp/maps.cc +++ b/sandbox/linux/seccomp/maps.cc @@ -103,8 +103,10 @@ Maps::Maps(const std::string& maps_file) : // obtained from /proc/self/maps, we instead fork() a child process and // use mremap() to uncover the obscured data. int tmp_fds[4]; - pipe(tmp_fds); - pipe(tmp_fds + 2); + if (pipe(tmp_fds)) + abort(); + if (pipe(tmp_fds + 2)) + abort(); pid_ = fork(); if (pid_ >= 0) { // Set up read and write file descriptors for exchanging data -- cgit v1.1