diff options
author | Cheer Xiao <xiaqqaix@gmail.com> | 2013-02-04 20:07:16 +0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-02-11 22:05:47 -0800 |
commit | 3f9706a7f350fcac43fc389b0b52b3601269e2e9 (patch) | |
tree | 7bc25f1a6bbbdf66ec56aaf5bc2c321dda45f879 /io.h | |
parent | 41fc3bcb748efc20e36160f5c361882c854f4baf (diff) |
Make io_data_t::fd const
In exec(), pipe_{write,read} no longer get reused.
Diffstat (limited to 'io.h')
-rw-r--r-- | io.h | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -32,7 +32,7 @@ public: /** Type of redirect */ const io_mode_t io_mode; /** FD to redirect */ - int fd; + const int fd; virtual void print() const = 0; virtual ~io_data_t() = 0; @@ -167,8 +167,10 @@ public: \param is_input set this parameter to zero if the buffer should be used to buffer the output of a command, or non-zero to buffer the input to a command. + + \param fd when -1, determined from is_input. */ - static io_buffer_t *create(bool is_input); + static io_buffer_t *create(bool is_input, int fd = -1); }; class io_chain_t : public std::vector<shared_ptr<io_data_t> > |