Stop adding close actions in pipe and bufferfills

Now that all pipes are marked CLOEXEC, there is no reason to add explicit
close calls here.
This commit is contained in:
ridiculousfish 2019-12-29 14:59:53 -08:00
parent d0cefe8b65
commit 5d55004841

View File

@ -58,14 +58,12 @@ dup2_list_t dup2_list_t::resolve_chain(const io_chain_t &io_chain) {
case io_mode_t::pipe: {
const io_pipe_t *io = static_cast<const io_pipe_t *>(io_ref.get());
result.add_dup2(io->pipe_fd(), io->fd);
result.add_close(io->pipe_fd());
break;
}
case io_mode_t::bufferfill: {
const io_bufferfill_t *io = static_cast<const io_bufferfill_t *>(io_ref.get());
result.add_dup2(io->write_fd(), io->fd);
result.add_close(io->write_fd());
break;
}
}