mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-25 09:39:52 +08: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
|
@ -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 New Issue
Block a user