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

Unified Diff: chrome/test/webdriver/webdriver_server.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
Index: chrome/test/webdriver/webdriver_server.cc
diff --git a/chrome/test/webdriver/webdriver_server.cc b/chrome/test/webdriver/webdriver_server.cc
index ccb8c70a9faac5ad7666653bc134dcbc94c6122a..5781bac40def47bd9d330280d4504d88da133164 100644
--- a/chrome/test/webdriver/webdriver_server.cc
+++ b/chrome/test/webdriver/webdriver_server.cc
@@ -19,6 +19,7 @@
#include "base/file_util.h"
#include "base/memory/scoped_ptr.h"
#include "base/path_service.h"
+#include "base/process_util.h"
#include "base/stringprintf.h"
#include "base/string_number_conversions.h"
#include "base/string_split.h"
@@ -226,8 +227,11 @@ int RunChromeDriver() {
CommandLine* cmd_line = CommandLine::ForCurrentProcess();
#if defined(OS_POSIX)
- signal(SIGPIPE, SIG_IGN);
-#endif
+ if (!IgnoreSigPipe()) {
+ LOG(ERROR) << "Failed to ignore SIGPIPE";
+ return EXIT_FAILURE;
+ }
+#endif // defined(OS_POSIX)
srand((unsigned int)time(NULL));
// Register Chrome's path provider so that the AutomationProxy will find our

Powered by Google App Engine
This is Rietveld 408576698