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

Issue 15980006: Fix for leaking file descriptor issue (Closed)

Created:
7 years, 6 months ago by kustermann
Modified:
7 years, 6 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Fix for leaking file descriptor issue When calling a non-existent executable, a pair of file descriptors will be created with pipe(). One end goes to the exitcode handler thread, the other end goes to the epoll() thread. If an error occurs during process creation, the pipe is still created and the exit handler thread writes the exitcode to the pipe, but the other file descriptor is not added to the epoll() set and is therefore leaked. (i.e. Process_Start ignores the other end of the pipe if exec() failed in Proces::Start()). R=sgjesse@google.com Committed: https://code.google.com/p/dart/source/detail?r=23534

Patch Set 1 #

Total comments: 1

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -0 lines) Patch
M runtime/bin/process_android.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/bin/process_linux.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download
M runtime/bin/process_macos.cc View 1 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
kustermann
https://codereview.chromium.org/15980006/diff/1/runtime/bin/process_linux.cc File runtime/bin/process_linux.cc (right): https://codereview.chromium.org/15980006/diff/1/runtime/bin/process_linux.cc#newcode521 runtime/bin/process_linux.cc:521: } In these two cases, we return a nonzero ...
7 years, 6 months ago (2013-06-03 07:30:27 UTC) #1
kustermann
7 years, 6 months ago (2013-06-03 07:41:27 UTC) #2
Søren Gjesse
lgtm, thanks Isn't this also the case on Mac OS?
7 years, 6 months ago (2013-06-03 07:49:51 UTC) #3
kustermann
As discussed offline, we should just close the reading part in Process::Start(). I updated it ...
7 years, 6 months ago (2013-06-03 09:31:24 UTC) #4
Søren Gjesse
LGTM!
7 years, 6 months ago (2013-06-03 09:40:53 UTC) #5
kustermann
If you're fine with it, I'll land it.
7 years, 6 months ago (2013-06-03 09:41:04 UTC) #6
kustermann
On 2013/06/03 09:40:53, Søren Gjesse wrote: > LGTM! Thank you.
7 years, 6 months ago (2013-06-03 09:41:28 UTC) #7
kustermann
7 years, 6 months ago (2013-06-03 09:41:49 UTC) #8
Message was sent while issue was closed.
Committed patchset #2 manually as r23534 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698