mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-26 10:43:47 +08:00
Remove the close_old field from io_fd_t, which is never actually
respected - a bug dating back to fish 1.x! The fd that would be closed is actually closed in io_cleanup_fds().
This commit is contained in:
parent
8ed08872b9
commit
1ce30deec3
2
exec.cpp
2
exec.cpp
|
@ -460,7 +460,7 @@ static bool io_transmogrify(const io_chain_t &in_chain, io_chain_t *out_chain, s
|
|||
}
|
||||
|
||||
opened_fds.push_back(fd);
|
||||
out.reset(new io_fd_t(in->fd, fd, true));
|
||||
out.reset(new io_fd_t(in->fd, fd));
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
8
io.h
8
io.h
|
@ -66,15 +66,11 @@ public:
|
|||
/** fd to redirect specified fd to. For example, in 2>&1, old_fd is 1, and io_data_t::fd is 2 */
|
||||
const int old_fd;
|
||||
|
||||
/** Whether to close old_fd */
|
||||
const bool close_old;
|
||||
|
||||
virtual void print() const;
|
||||
|
||||
io_fd_t(int f, int old, bool close = false) :
|
||||
io_fd_t(int f, int old) :
|
||||
io_data_t(IO_FD, f),
|
||||
old_fd(old),
|
||||
close_old(close)
|
||||
old_fd(old)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user