Migrate the notion of 'foreground' from job to job group

Whether a job is foreground is a property of its pgid, so it belongs
naturally on the job group.
This commit is contained in:
ridiculousfish
2020-07-11 17:01:52 -07:00
parent 0c72e65071
commit 765c48afa4
6 changed files with 64 additions and 40 deletions

View File

@@ -104,7 +104,7 @@ int builtin_fg(parser_t &parser, io_streams_t &streams, wchar_t **argv) {
reader_write_title(job->command(), parser);
parser.job_promote(job);
job->mut_flags().foreground = true;
job->group->set_is_foreground(true);
job->continue_job(parser, true, job->is_stopped());
return STATUS_CMD_OK;