Skip to content

Commit

Permalink
Make shell a process group leader
Browse files Browse the repository at this point in the history
  • Loading branch information
rafalmiel committed Oct 19, 2023
1 parent 57cdeba commit 3173a6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions userspace/src/bin/init/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ fn spawn_shell() -> usize {
}
syscall::ioctl(0, syscall_defs::ioctl::tty::TIOCSCTTY, 0)
.expect("Failed to attach tty");
syscall::setpgid(0, 0).expect("Failed to make process a group leader");
if let Err(e) = syscall::exec(
"/usr/bin/bash",
None,
Expand Down

0 comments on commit 3173a6c

Please sign in to comment.