mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-12 06:41:14 -03:00
Factor out logic about how pgroups are assigned
Introduce pgroup_provenance_t, a type which captures "where the pgroup comes from." This centralizes some logic around how pgroups are assigned, and it anticipates concurrent execution.
This commit is contained in:
@@ -1302,6 +1302,9 @@ end_execution_reason_t parse_execution_context_t::run_1_job(tnode_t<g::job> job_
|
||||
|
||||
// Clean up the job on failure or cancellation.
|
||||
if (pop_result == end_execution_reason_t::ok) {
|
||||
// Set the pgroup assignment mode, now that the job is populated.
|
||||
job->pgroup_mode = get_pgroup_provenance(job, lineage);
|
||||
|
||||
// Success. Give the job to the parser - it will clean it up.
|
||||
parser->job_add(job);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user