Make in_foreground an explicit param to continue_job

This moves us slightly closer towards fish code in the background. The idea is
that a background job may still have "foreground" sub-jobs, example:

    begin ; sleep 5 ; end &

The begin/end job runs in the background but should wait for `sleep`.

Prior to this fix, fish would see the overall job group is in the background
and not wait for any of its processes. With this change we detach waiting from
is_foreground.
This commit is contained in:
ridiculousfish
2020-07-27 15:51:37 -07:00
parent 3382bc70d2
commit 3506274ccf
4 changed files with 9 additions and 7 deletions

View File

@@ -1004,7 +1004,7 @@ bool exec_job(parser_t &parser, const shared_ptr<job_t> &j, const io_chain_t &bl
return false;
}
j->continue_job(parser);
j->continue_job(parser, !j->is_initially_background());
return true;
}