MCPcopy Create free account
hub / github.com/bendudson/EuraliOS / new_shell

Method new_shell

init/src/main.rs:49–66  ·  view source on GitHub ↗

Launch a login process on a new console Returns the console to enable switching to/from this login/shell

(vga_com: &'a CommHandle)

Source from the content-addressed store, hash-verified

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(

Callers

nothing calls this directly

Calls 3

execFunction · 0.85
cloneMethod · 0.80
new_rendezvousFunction · 0.50

Tested by

no test coverage detected