aboutsummaryrefslogtreecommitdiffhomepage
path: root/proc.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-10-06 13:08:57 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-10-06 13:08:57 -0700
commitdd91779442125ca46a434cd94cc51ae32e43bee1 (patch)
treee023ebb7a8a0e6f9c6c4a394158773ced0c98a82 /proc.h
parente58b73179f4727c79465c6f273aef377b9bb8bee (diff)
parentfab7299d49492ce548d4ceed66d3acbd05dd99c7 (diff)
Merge branch 'master' into ast_no_templates
Conflicts: configure.ac exec.cpp
Diffstat (limited to 'proc.h')
-rw-r--r--proc.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/proc.h b/proc.h
index 1d4d210d..aff7983b 100644
--- a/proc.h
+++ b/proc.h
@@ -134,6 +134,8 @@ private:
/* narrow copy of argv0 so we don't have to convert after fork */
narrow_string_rep_t argv0_narrow;
+ io_chain_t process_io_chain;
+
/* No copying */
process_t(const process_t &rhs);
void operator=(const process_t &rhs);
@@ -190,6 +192,17 @@ public:
return argv0_narrow.get();
}
+ /* IO chain getter and setter */
+ const io_chain_t &io_chain() const
+ {
+ return process_io_chain;
+ }
+
+ void set_io_chain(const io_chain_t &chain)
+ {
+ this->process_io_chain = chain;
+ }
+
/** actual command to pass to exec in case of EXTERNAL or INTERNAL_EXEC. */
wcstring actual_cmd;
@@ -272,6 +285,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,13 +298,16 @@ class job_t
/* narrow copy so we don't have to convert after fork */
narrow_string_rep_t command_narrow;
+ /* The IO chain associated with the block */
+ const io_chain_t block_io;
+
/* No copying */
job_t(const job_t &rhs);
void operator=(const job_t &);
public:
- job_t(job_id_t jobid);
+ job_t(job_id_t jobid, const io_chain_t &bio);
~job_t();
/** Returns whether the command is empty. */
@@ -350,13 +367,16 @@ 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;
+
+ /* Returns the block IO redirections associated with the job. These are things like the IO redirections associated with the begin...end statement. */
+ const io_chain_t &block_io_chain() const { return this->block_io; }
+
+ /* Fetch all the IO redirections associated with the job */
+ io_chain_t all_io_redirections() const;
};
/**