Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: components/nacl/loader/nacl_helper_linux.cc

Issue 288063004: Always Ignore SIGPIPE for NaCl both in SFI mode and non SFI mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/nacl/loader/nacl_helper_linux.cc
diff --git a/components/nacl/loader/nacl_helper_linux.cc b/components/nacl/loader/nacl_helper_linux.cc
index e170c526da5b2dcd302a5e17c83b05f6d4432a7d..8c042d02688e6a039b5d565f8e43eb138e00917f 100644
--- a/components/nacl/loader/nacl_helper_linux.cc
+++ b/components/nacl/loader/nacl_helper_linux.cc
@@ -91,6 +91,11 @@ void BecomeNaClLoader(base::ScopedFD browser_fd,
nacl::nonsfi::InitializeSignalHandler();
}
+ // Always ignore SIGPIPE, for consistency with other Chrome processes and
+ // because some IPC code, such as sync_socket_posix.cc, requires this.
+ // We do this before seccomp-bpf is initialized.
+ PCHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR);
+
// Finish layer-1 sandbox initialization and initialize the layer-2 sandbox.
CHECK(!nacl_sandbox->HasOpenDirectory());
nacl_sandbox->InitializeLayerTwoSandbox(uses_nonsfi_mode);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698