Chromium Code Reviews
DescriptionOnly 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 #Messages
Total messages: 12 (8 generated)
|