aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-18 16:55:01 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-19 18:06:24 -0700
commite849beabbab31c83ac57693cb0a7ac1e58f8cfd5 (patch)
treefa8872516ac378bd32ef3be5844100bc64cf4c1b /proc.h
parent2979d3bf169f51fb2ba218897994745754f830f9 (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.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/proc.h b/proc.h
index 16383111..7a0dc3a1 100644
--- a/proc.h
+++ b/proc.h
@@ -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); }
};
/**