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

Unified Diff: third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc

Issue 2478633002: Update Crashpad to b47bf6c250c6b825dee1c5fbad9152c2c962e828 (Closed)
Patch Set: mac comment 2 Created 4 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: third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc
diff --git a/third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc b/third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc
index caf2b476b41724106a6e4632b6911fcd331bb972..93363a014d0ccd0366fbbcaa8a6f350b20f98e08 100644
--- a/third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc
+++ b/third_party/crashpad/crashpad/test/multiprocess_exec_posix.cc
@@ -25,6 +25,10 @@
#include "util/misc/scoped_forbid_return.h"
#include "util/posix/close_multiple.h"
+#if defined(OS_LINUX)
+#include <stdio_ext.h>
+#endif
+
namespace crashpad {
namespace test {
@@ -78,8 +82,14 @@ void MultiprocessExec::MultiprocessChild() {
ASSERT_NE(read_handle, STDOUT_FILENO);
ASSERT_EQ(STDIN_FILENO, fileno(stdin));
- int rv = fpurge(stdin);
+ int rv;
+
+#if defined(OS_LINUX)
+ __fpurge(stdin);
+#else
+ rv = fpurge(stdin);
ASSERT_EQ(0, rv) << ErrnoMessage("fpurge");
+#endif
rv = HANDLE_EINTR(dup2(read_handle, STDIN_FILENO));
ASSERT_EQ(STDIN_FILENO, rv) << ErrnoMessage("dup2");

Powered by Google App Engine
This is Rietveld 408576698