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

Unified Diff: util/test/multiprocess_exec_test_child.cc

Issue 809153003: Cleanup: Use FOPEN_MAX instead of OPEN_MAX. (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad.git@master
Patch Set: Created 6 years 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: util/test/multiprocess_exec_test_child.cc
diff --git a/util/test/multiprocess_exec_test_child.cc b/util/test/multiprocess_exec_test_child.cc
index e1a06122ed1779d9cf1d33b125505053c1e1979c..26a7bc9930fb8b565cfeb4055d8b23671041d380 100644
--- a/util/test/multiprocess_exec_test_child.cc
+++ b/util/test/multiprocess_exec_test_child.cc
@@ -22,10 +22,10 @@
#include <algorithm>
int main(int argc, char* argv[]) {
- // Make sure that there’s nothing open at any FD higher than 3. All FDs other
+ // Make sure that there's nothing open at any FD higher than 3. All FDs other
Mark Mentovai 2014/12/18 13:46:32 Please don’t do this. If necessary, set your edito
// than stdin, stdout, and stderr should have been closed prior to or at
// exec().
- int max_fd = std::max(static_cast<int>(sysconf(_SC_OPEN_MAX)), OPEN_MAX);
+ int max_fd = std::max(static_cast<int>(sysconf(_SC_OPEN_MAX)), FOPEN_MAX);
scottmg 2014/12/18 03:53:18 These seems to be quite a bit different on OS X:
Mark Mentovai 2014/12/18 13:46:32 OPEN_MAX and FOPEN_MAX are completely unrelated. T
max_fd = std::max(max_fd, getdtablesize());
for (int fd = STDERR_FILENO + 1; fd < max_fd; ++fd) {
if (close(fd) == 0 || errno != EBADF) {
« 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