diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-18 16:55:01 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-19 18:06:24 -0700 |
commit | e849beabbab31c83ac57693cb0a7ac1e58f8cfd5 (patch) | |
tree | fa8872516ac378bd32ef3be5844100bc64cf4c1b /proc.h | |
parent | 2979d3bf169f51fb2ba218897994745754f830f9 (diff) |
Initial work towards various IO cleanups with an eye to fixing https://github.com/fish-shell/fish-shell/issues/110
Diffstat (limited to 'proc.h')
-rw-r--r-- | proc.h | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -272,6 +272,7 @@ void release_job_id(job_id_t jobid); A struct represeting a job. A job is basically a pipeline of one or more processes and a couple of flags. */ +class parser_t; class job_t { /** @@ -284,6 +285,10 @@ class job_t /* narrow copy so we don't have to convert after fork */ narrow_string_rep_t command_narrow; + /** List of all IO redirections for this job. */ + io_chain_t io; + friend void exec(parser_t &parser, job_t *j); + /* No copying */ job_t(const job_t &rhs); void operator=(const job_t &); @@ -350,13 +355,14 @@ public: */ const job_id_t job_id; - /** List of all IO redirections for this job. */ - io_chain_t io; - /** Bitset containing information about the job. A combination of the JOB_* constants. */ unsigned int flags; + + const io_chain_t &io_chain() const { return this->io; } + + void append_io(const shared_ptr<io_data_t> & new_io) { this->io.push_back(new_io); } }; /** |