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

Unified Diff: base/test/multiprocess_test_android.cc

Issue 196343019: IPC: Make ipc_perftests run on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 9 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 | « base/posix/global_descriptors.h ('k') | base/test/perf_log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/multiprocess_test_android.cc
diff --git a/base/test/multiprocess_test_android.cc b/base/test/multiprocess_test_android.cc
index e9e776ee0a054dae6918a0fdbbe36a342550bcd2..126d8b11e0a30fd35feda07c51da0ffa37f75934 100644
--- a/base/test/multiprocess_test_android.cc
+++ b/base/test/multiprocess_test_android.cc
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/posix/global_descriptors.h"
#include "base/test/multiprocess_test.h"
#include <unistd.h>
@@ -42,10 +43,10 @@ ProcessHandle SpawnMultiProcessTestChild(const std::string& procname,
it != fds_to_remap->end(); ++it) {
fds_to_keep_open.insert(it->first);
}
- // Keep stdin, stdout and stderr open since this is not meant to spawn a
- // daemon.
- const int kFdForAndroidLogging = 3; // FD used by __android_log_write().
- for (int fd = kFdForAndroidLogging + 1; fd < getdtablesize(); ++fd) {
+ // Keep standard FDs (stdin, stdout, stderr, etc.) open since this
+ // is not meant to spawn a daemon.
+ int base = GlobalDescriptors::kBaseDescriptor;
+ for (int fd = base; fd < getdtablesize(); ++fd) {
if (fds_to_keep_open.find(fd) == fds_to_keep_open.end()) {
close(fd);
}
« no previous file with comments | « base/posix/global_descriptors.h ('k') | base/test/perf_log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698