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

Issue 2670213004: Only allow the desired child proc to inherit its output file. (Closed)

Created:
3 years, 10 months ago by grt (UTC plus 2)
Modified:
3 years, 10 months ago
Reviewers:
Paweł Hajdan Jr.
CC:
chromium-reviews, vmpstr+watch_chromium.org, Tomasz Moniuszko
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Only allow the desired child proc to inherit its output file. Prior to this change, other children would end up with references to an earlier child's stdout handle, thereby preventing it from being deleted. This change alone makes things better, but doesn't entirely plug the hole: OpenFile (used by ReadFileToString) inadvertently opens its handles for inheritance due to implementation details of the Microsoft CRT. There exists an undocumented "N" mode flag for opening file streams that disables allowing the opened file to be inherited into child processes. Another CL will address this. BUG=671990 R=phajdan.jr@chromium.org Review-Url: https://codereview.chromium.org/2670213004 Cr-Commit-Position: refs/heads/master@{#447996} Committed: https://chromium.googlesource.com/chromium/src/+/9ea51a5ffa60046859be210ca5a76ae85abf5a94

Patch Set 1 #

Patch Set 2 : comment tweak #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -13 lines) Patch
M base/test/launcher/test_launcher.cc View 1 2 chunks +22 lines, -13 lines 0 comments Download

Messages

Total messages: 12 (8 generated)
grt (UTC plus 2)
PTAL
3 years, 10 months ago (2017-02-03 12:43:59 UTC) #4
Paweł Hajdan Jr.
LGTM . Thanks! Consider making it more obvious in the comment that we rely on ...
3 years, 10 months ago (2017-02-03 12:54:27 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2670213004/20001
3 years, 10 months ago (2017-02-03 13:03:56 UTC) #9
commit-bot: I haz the power
3 years, 10 months ago (2017-02-03 14:43:07 UTC) #12
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/chromium/src/+/9ea51a5ffa60046859be210ca5a7...

Powered by Google App Engine
This is Rietveld 408576698