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

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..1489a8646225d0f85173482b5ba4d523bef045b3 100644
--- a/components/nacl/loader/nacl_helper_linux.cc
+++ b/components/nacl/loader/nacl_helper_linux.cc
@@ -91,6 +91,10 @@ void BecomeNaClLoader(base::ScopedFD browser_fd,
nacl::nonsfi::InitializeSignalHandler();
}
+ // Always ignore SIGPIPE. We check the return value of write().
Mark Seaborn 2014/05/15 16:21:25 The "we" here is rather vague (and different from
hidehiko 2014/05/16 08:21:02 Done.
+ // We do this just before seccomp-bpf is initialized.
Mark Seaborn 2014/05/15 16:21:25 Maybe omit "just", so that this doesn't become wro
hidehiko 2014/05/16 08:21:02 Done.
+ CHECK(signal(SIGPIPE, SIG_IGN) != SIG_ERR);
Mark Seaborn 2014/05/15 16:21:25 You could use PCHECK to print errno if this fails.
hidehiko 2014/05/16 08:21:02 Done.
+
// 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