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) { |