aboutsummaryrefslogtreecommitdiffhomepage
path: root/io.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-30 02:22:38 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-01-30 02:22:38 -0800
commit1879dc4b595e1209d2c7ea159fb6e37287edd520 (patch)
tree2a0d5a50760a2554bc8a399997ad7cfa96af704f /io.h
parentea8c6bc15ebd973f41b33a103b1e63cc9a772058 (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.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/io.h b/io.h
index 2a1999c9..b007bbf6 100644
--- a/io.h
+++ b/io.h
@@ -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);