OpenFile (used by ReadFileToString, among others) 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. base::OpenFile should add this to the mode string if it isn't already present (it shouldn't be).
Comment 1 by grt@chromium.org
, Feb 6 2017