Make job_control a constant property of job_t

It no longer changes.
This commit is contained in:
ridiculousfish
2020-02-08 14:14:21 -08:00
parent ce88e8739f
commit 91df645c62
3 changed files with 5 additions and 11 deletions

View File

@@ -918,12 +918,6 @@ bool exec_job(parser_t &parser, const shared_ptr<job_t> &j, const job_lineage_t
// Check to see if we should reclaim the foreground pgrp after the job finishes or stops.
const bool reclaim_foreground_pgrp = (tcgetpgrp(STDIN_FILENO) == pgrp);
// If we are running nested inside a function or block with job control, then we need job
// control too.
if (lineage.root_has_job_control) {
j->mut_flags().job_control = true;
}
// Perhaps we know our pgroup already.
assert(j->pgid == INVALID_PID && "Should not yet have a pid.");
switch (j->pgroup_provenance) {