mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 06:56:09 +08:00
Move root_has_job_control from lineage to job_tree
Whether we have job control is a property of the job tree, not of individual jobs. Reflect that fact directly by moving it into the job tree.
This commit is contained in:
parent
e95bcfb074
commit
fe60f2ef16
@ -663,7 +663,6 @@ static proc_performer_t get_performer_for_process(process_t *p, job_t *job,
|
||||
lineage.job_tree = job->job_tree;
|
||||
lineage.block_io = io_chain;
|
||||
lineage.root_constructed = job->root_constructed;
|
||||
lineage.root_has_job_control = job->wants_job_control();
|
||||
|
||||
if (p->type == process_type_t::block_node) {
|
||||
const parsed_source_ref_t &source = p->block_node_source;
|
||||
|
@ -1251,7 +1251,7 @@ end_execution_reason_t parse_execution_context_t::run_1_job(tnode_t<g::job> job_
|
||||
bool wants_job_control =
|
||||
(job_control_mode == job_control_t::all) ||
|
||||
((job_control_mode == job_control_t::interactive) && parser->is_interactive()) ||
|
||||
lineage.root_has_job_control;
|
||||
(lineage.job_tree && lineage.job_tree->wants_job_control());
|
||||
|
||||
job_t::properties_t props{};
|
||||
props.wants_terminal = wants_job_control && !ld.is_event;
|
||||
|
@ -335,10 +335,6 @@ struct job_lineage_t {
|
||||
/// is part of a pipeline, then this may be set.
|
||||
job_tree_ref_t job_tree{};
|
||||
|
||||
/// Whether job control is on for the root.
|
||||
/// This is set if our job is nested as part of a function or block execution.
|
||||
bool root_has_job_control{false};
|
||||
|
||||
/// The IO chain associated with any block containing this job.
|
||||
/// For example, in `begin; foo ; end < file.txt` this would have the 'file.txt' IO.
|
||||
io_chain_t block_io{};
|
||||
|
Loading…
x
Reference in New Issue
Block a user