feat(userspace): shell runs programs (ls, cat) via spawn w/ terminal+storage+args page; ext4 holes read as zeros; storage re-attach same buffer

This commit is contained in:
2026-10-27 17:22:08 +01:00
parent 0fd568cdad
commit c603a578c0
22 changed files with 396 additions and 66 deletions

View File

@@ -153,6 +153,6 @@ fn hand_over_console(log: CapSlot) {
pub(crate) fn start(program: &LoadedProcess, console: Option<CapSlot>) {
let log = libkos::start::log()
.and_then(|l| syscall::delegate(l, program.process_cap, perms(&[Permission::Execute])));
let arg = types::start_arg::encode(console, log);
let arg = types::start_arg::StartArg { console, log, ..Default::default() }.encode();
syscall::spawn_thread_in(program.process_cap, program.entry_point, USER_STACK_TOP, arg);
}

View File

@@ -79,6 +79,8 @@ pub const TESTS: &[Program] = &[Program {
/// The desktop; the test image runs the SMP self-test instead.
pub const APPS: &[Program] = &[Program {
serves: false,
uses: &["terminal"],
uses: &["terminal", "storage"],
// Room for one program at a time, the way the shell runs them.
spawns: Some(Limits { pages: 256, endpoints: 2, notifications: 2, regions: 2 }),
..server("shell", b"shell.elf", SMALL)
}];