Index: base/process_util_unittest.cc |
=================================================================== |
--- base/process_util_unittest.cc (revision 29472) |
+++ base/process_util_unittest.cc (working copy) |
@@ -198,7 +198,9 @@ |
int max_files = GetMaxFilesOpenInProcess(); |
for (int i = STDERR_FILENO + 1; i < max_files; i++) { |
if (i != kChildPipe) { |
- if (HANDLE_EINTR(close(i)) != -1) { |
+ int fd; |
+ if ((fd = HANDLE_EINTR(dup(i))) != -1) { |
+ close(fd); |
num_open_files += 1; |
} |
} |