fix needless pg churn
This commit is contained in:
parent
a3181aa210
commit
014be6ece3
1 changed files with 5 additions and 6 deletions
|
|
@ -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")
|
).expect("couldn't take terminal from owning process")
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(e) = unistd::setpgid(
|
if pid != pgid {
|
||||||
unistd::Pid::from_raw(0),
|
if let Err(e) = unistd::setpgid(pid, pid) {
|
||||||
unistd::Pid::from_raw(0)
|
panic!("couldn't set PGID: {}", e)
|
||||||
) {
|
};
|
||||||
panic!("couldn't set PGID: {}", e)
|
}
|
||||||
};
|
|
||||||
|
|
||||||
if let Err(e) = unistd::tcsetpgrp(0, pid) {
|
if let Err(e) = unistd::tcsetpgrp(0, pid) {
|
||||||
panic!("couldn't grab terminal: {}", e)
|
panic!("couldn't grab terminal: {}", e)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue