diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-30 02:22:38 -0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-01-30 02:22:38 -0800 |
commit | 1879dc4b595e1209d2c7ea159fb6e37287edd520 (patch) | |
tree | 2a0d5a50760a2554bc8a399997ad7cfa96af704f /io.h | |
parent | ea8c6bc15ebd973f41b33a103b1e63cc9a772058 (diff) |
Initial set of changes working to make fish robust against running out of file descriptors
Diffstat (limited to 'io.h')
-rw-r--r-- | io.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -95,22 +95,22 @@ class io_pipe_t : public io_data_t protected: io_pipe_t(io_mode_t m, int f, bool i): io_data_t(m, f), - pipe_fd(), is_input(i) { + pipe_fd[0] = pipe_fd[1] = -1; } public: int pipe_fd[2]; - bool is_input; + const bool is_input; virtual void print() const; io_pipe_t(int f, bool i): io_data_t(IO_PIPE, f), - pipe_fd(), is_input(i) { + pipe_fd[0] = pipe_fd[1] = -1; } }; @@ -178,6 +178,7 @@ public: io_chain_t(const shared_ptr<io_data_t> &); void remove(const shared_ptr<const io_data_t> &element); + void push_back(const shared_ptr<io_data_t> &element); shared_ptr<const io_data_t> get_io_for_fd(int fd) const; shared_ptr<io_data_t> get_io_for_fd(int fd); |