Express the "nested job control" idea directly

Prior to this fix, we would infer that nested jobs need job control.
Just pass that along explicitly in the job lineage.
This commit is contained in:
ridiculousfish
2020-01-29 16:08:10 -08:00
parent 28a8d0dbf7
commit 40ff4215a8
3 changed files with 13 additions and 2 deletions

View File

@@ -1265,7 +1265,8 @@ end_execution_reason_t parse_execution_context_t::run_1_job(tnode_t<g::job> job_
auto job_control_mode = get_job_control_mode();
bool wants_job_control =
(job_control_mode == job_control_t::all) ||
((job_control_mode == job_control_t::interactive) && parser->is_interactive());
((job_control_mode == job_control_t::interactive) && parser->is_interactive()) ||
lineage.root_has_job_control;
job_t::properties_t props{};
props.wants_terminal = wants_job_control && !ld.is_event;