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

Issue 14497: POSIX: don't leak FDs when launching child Processes. (Closed)

Created:
12 years ago by jeremy
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

* On POSIX, make sure we don't leak FDs when launching child Processes. * Add a facility to LaunchProcess() to remap a given FD into a child process. This change is needed for 2 reasons: 1)We want to use a socketpair() for IPC, the child process needs a known FD # for it's side of the socket. 2)The OS X Sandbox doesn't close FDs.

Patch Set 1 #

Patch Set 2 : whitespace fixes #

Total comments: 3

Patch Set 3 : Fix Windows Compilation #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -22 lines) Patch
M base/base.xcodeproj/project.pbxproj View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M base/multiprocess_test.h View 1 2 3 chunks +34 lines, -5 lines 0 comments Download
M base/process_util.h View 2 chunks +11 lines, -0 lines 0 comments Download
M base/process_util_linux.cc View 1 2 5 chunks +31 lines, -2 lines 0 comments Download
M base/process_util_mac.mm View 1 1 chunk +52 lines, -12 lines 0 comments Download
M base/process_util_posix.cc View 1 2 2 chunks +18 lines, -0 lines 0 comments Download
M base/process_util_unittest.cc View 1 2 2 chunks +75 lines, -2 lines 0 comments Download
M net/url_request/url_request_unittest.h View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
jeremy
Also re-enable process_utils_unittest.cc on OS X. Mike: Did we disable the test for some reason ...
12 years ago (2008-12-17 00:41:46 UTC) #1
agl
LGTM http://codereview.chromium.org/14497/diff/10/14 File base/process_util_linux.cc (right): http://codereview.chromium.org/14497/diff/10/14#newcode69 Line 69: close(src_fd); No need to close here, you've ...
12 years ago (2008-12-17 01:50:15 UTC) #2
pink (ping after 24hrs)
12 years ago (2008-12-17 19:09:05 UTC) #3
LGTM

http://codereview.chromium.org/14497/diff/10/16
File base/process_util_posix.cc (right):

http://codereview.chromium.org/14497/diff/10/16#newcode41
Line 41: // rlim_t is a uint64 - clip to maxint.
why?

Powered by Google App Engine
This is Rietveld 408576698