mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-24 18:40:42 +08:00
Improve commenting regarding process groups and builtins.
This commit is contained in:
parent
0c18f68cc2
commit
8de266afb4
|
@ -489,6 +489,8 @@ static bool exec_internal_builtin_proc(parser_t &parser, job_t *j, process_t *p,
|
|||
// make exec handle things.
|
||||
const int fg = j->get_flag(JOB_FOREGROUND);
|
||||
j->set_flag(JOB_FOREGROUND, false);
|
||||
|
||||
// Note this call may block for a long time, while the builtin performs I/O.
|
||||
p->status = builtin_run(parser, p->get_argv(), streams);
|
||||
|
||||
// Restore the fg flag, which is temporarily set to false during builtin
|
||||
|
|
|
@ -103,11 +103,7 @@ bool child_set_group(job_t *j, process_t *p) {
|
|||
/// guaranteeing the job control process group has been created and that the child belongs to the
|
||||
/// correct process group. Here we can update our job_t structure to reflect the correct process
|
||||
/// group in the case of JOB_CONTROL, and we can give the new process group control of the terminal
|
||||
/// if it's to run in the foreground. Note that we can guarantee the child won't try to read from
|
||||
/// the terminal before we've had a chance to run this code, because we haven't woken them up with a
|
||||
/// SIGCONT yet. This musn't be called as a part of setup_child_process because that can hang
|
||||
/// indefinitely until data is available to read/write in the case of IO_FILE, which means we'll
|
||||
/// never reach our SIGSTOP and everything hangs.
|
||||
/// if it's to run in the foreground.
|
||||
bool set_child_group(job_t *j, pid_t child_pid) {
|
||||
bool retval = true;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user