fix needless pg churn

This commit is contained in:
Ava Apples Affine 2023-04-17 20:17:42 -07:00
parent a3181aa210
commit 014be6ece3
Signed by: affine
GPG key ID: 3A4645B8CF806069

View file

@ -471,12 +471,11 @@ pub fn load_posix_shell(syms: &mut SymTable, shell_state: Rc<RefCell<ShellState>
).expect("couldn't take terminal from owning process")
}
if let Err(e) = unistd::setpgid(
unistd::Pid::from_raw(0),
unistd::Pid::from_raw(0)
) {
panic!("couldn't set PGID: {}", e)
};
if pid != pgid {
if let Err(e) = unistd::setpgid(pid, pid) {
panic!("couldn't set PGID: {}", e)
};
}
if let Err(e) = unistd::tcsetpgrp(0, pid) {
panic!("couldn't grab terminal: {}", e)