fix: ensure /dev/null
fd is closed on failure (#47543)
* 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
42325294ab
commit
253d49b24f
1 changed files with 3 additions and 0 deletions
|
@ -78,6 +78,9 @@ UtilityProcessWrapper::UtilityProcessWrapper(
|
|||
base::FileHandleMappingVector fds_to_remap;
|
||||
#endif
|
||||
for (const auto& [io_handle, io_type] : stdio) {
|
||||
if (io_handle == IOHandle::STDIN)
|
||||
continue;
|
||||
|
||||
if (io_type == IOType::IO_PIPE) {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
HANDLE read = nullptr;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue