mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-11 15:37:24 +00:00
use current PGID (not PID) for new processes when job control is off
If fish is not the first process in a pipeline, and jobs are started from the fish process, it is possible for fish and the OS to have different ideas about what the process group of the jobs are. This change confirms the current PGID, rather than assuming that it is the same as the PID.
This commit is contained in:
parent
10e64fd548
commit
8f77b1cdd2
1 changed files with 1 additions and 1 deletions
|
@ -101,7 +101,7 @@ bool set_child_group(job_t *j, process_t *p, int print_errors) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
j->pgid = getpid();
|
||||
j->pgid = getpgrp();
|
||||
}
|
||||
|
||||
if (j->get_flag(JOB_TERMINAL) && j->get_flag(JOB_FOREGROUND)) { //!OCLINT(early exit)
|
||||
|
|
Loading…
Reference in a new issue