io_data_t to store the source_fd directly

Now that all io_data_ts know their source fd, just store it directly in
the base class. This will simplify some uses of io_data_t.
This commit is contained in:
ridiculousfish
2019-12-29 15:14:08 -08:00
parent 5d55004841
commit 0af5608ce8
4 changed files with 21 additions and 16 deletions

View File

@@ -51,7 +51,7 @@ dup2_list_t dup2_list_t::resolve_chain(const io_chain_t &io_chain) {
case io_mode_t::fd: {
const io_fd_t *io = static_cast<const io_fd_t *>(io_ref.get());
result.add_dup2(io->old_fd, io->fd);
result.add_dup2(io->source_fd, io->fd);
break;
}