fix: ensure /dev/null
fd is closed on failure (#47541)
* fix: ensure /dev/null fd is closed on failure Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> * chore: ignore closehandle for windows Co-authored-by: Robo <hop2deep@gmail.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com> Co-authored-by: Robo <hop2deep@gmail.com>
This commit is contained in:
parent
cd42e9ba05
commit
d4a93c896d
1 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,9 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
||||||
base::FileHandleMappingVector fds_to_remap;
|
base::FileHandleMappingVector fds_to_remap;
|
||||||
#endif
|
#endif
|
||||||
for (const auto& [io_handle, io_type] : stdio) {
|
for (const auto& [io_handle, io_type] : stdio) {
|
||||||
|
if (io_handle == IOHandle::STDIN)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (io_type == IOType::IO_PIPE) {
|
if (io_type == IOType::IO_PIPE) {
|
||||||
#if BUILDFLAG(IS_WIN)
|
#if BUILDFLAG(IS_WIN)
|
||||||
HANDLE read = nullptr;
|
HANDLE read = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue