Launch a login process on a new console Returns the console to enable switching to/from this login/shell
(vga_com: &'a CommHandle)
| 47 | /// Launch a login process on a new console |
| 48 | /// Returns the console to enable switching to/from this login/shell |
| 49 | pub fn new_shell(vga_com: &'a CommHandle) -> Self { |
| 50 | let mut console = Self::new(vga_com); |
| 51 | |
| 52 | // New Rendezvous for shell input |
| 53 | let (input, input2) = syscalls::new_rendezvous().unwrap(); |
| 54 | console.input = Some(input); |
| 55 | |
| 56 | // Start the process |
| 57 | syscalls::exec( |
| 58 | include_bytes!("../../user/login"), |
| 59 | 0, |
| 60 | input2, |
| 61 | console.output.clone(), |
| 62 | VFS::shared(), |
| 63 | Vec::new(), |
| 64 | "").expect("[init] Couldn't start user program"); |
| 65 | console |
| 66 | } |
| 67 | |
| 68 | pub fn activate(&self) { |
| 69 | if let Err((err, _msg)) = syscalls::send( |
nothing calls this directly
no test coverage detected