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

Unified Diff: base/process_util_unittest.cc

Issue 293018: Fix ProcessUtilTest.FDRemapping hang on x86_64 by counting open fds in child ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
}
« 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