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

Unified Diff: base/debug/stack_trace_android.cc

Issue 11280010: Extract SIGPIPE ignoring code to a common place. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix ios Created 8 years, 1 month 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 | base/debug/stack_trace_posix.cc » ('j') | base/process_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/stack_trace_android.cc
diff --git a/base/debug/stack_trace_android.cc b/base/debug/stack_trace_android.cc
index cc03d60ba97f3d8fe7e6dd121391592bdb37d44a..2d9a422ef3f7b30844a7f66f4eb86b51f52ee486 100644
--- a/base/debug/stack_trace_android.cc
+++ b/base/debug/stack_trace_android.cc
@@ -9,6 +9,7 @@
#include <unistd.h>
#include "base/logging.h"
+#include "base/process_util.h"
namespace base {
namespace debug {
@@ -17,12 +18,8 @@ bool EnableInProcessStackDumping() {
// When running in an application, our code typically expects SIGPIPE
// to be ignored. Therefore, when testing that same code, it should run
// with SIGPIPE ignored as well.
- // TODO(phajdan.jr): De-duplicate this SIGPIPE code.
- struct sigaction action;
- memset(&action, 0, sizeof(action));
- action.sa_handler = SIG_IGN;
- sigemptyset(&action.sa_mask);
- return (sigaction(SIGPIPE, &action, NULL) == 0);
+ // TODO(phajdan.jr): Ignoring SIGPIPE has nothing to do with stack dumping.
+ return base::IgnoreSigPipe();
}
StackTrace::StackTrace() {
« no previous file with comments | « no previous file | base/debug/stack_trace_posix.cc » ('j') | base/process_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698