host: process table, shell, coreutils and harness (T8, T9)

T8: sausage:process WIT (spawn, wait, kill), one store per process over the
shared root, /proc/processes, /run, pipeline and cancellation groups, Exec.
brush and 78 uutils commands; the shared cwd-init object sets the cwd from PWD
and keeps numeric exit codes. The corpus matches native bash.

T9: V8 (deno_core) runs pi-durable, pi-ai and chord; SQLite storage in
<dir>/host/harness.sqlite (WAL, synchronous=FULL); file tools on the VFS, bash
through Exec; resumes after SIGKILL.
This commit is contained in:
2026-11-06 16:34:34 +00:00
parent 5ce2a2f2bd
commit 57a47b069e
41 changed files with 87601 additions and 82 deletions
+31
View File
@@ -0,0 +1,31 @@
//! ps reads the process snapshot. kill stops a process group through the process interface.
mod bindings {
wit_bindgen::generate!({ path: "../../host/wit", world: "program", generate_all });
}
fn main() {
let args: Vec<String> = std::env::args().collect();
match std::path::Path::new(&args[0])
.file_name()
.unwrap()
.to_str()
.unwrap()
{
"ps" => print!(
"{}",
std::fs::read_to_string("/proc/processes").expect("process snapshot")
),
"kill" => {
if args.len() < 2 {
std::process::exit(2);
}
for pid in &args[1..] {
let pid: u32 = pid.parse().expect("numeric pid");
if let Err(error) = bindings::sausage::process::host::kill(pid) {
eprintln!("kill: {error}");
std::process::exit(1);
}
}
}
_ => std::process::exit(127),
}
}