feat(userspace): programs in /bin w/o .elf; bin manifests (needs = display) so shell runs snake; Ctrl+C kills foreground via terminal interrupt notification; ctrl keys; sleep

This commit is contained in:
2026-10-27 21:16:00 +01:00
parent 1fc5a54f06
commit 83809bbe94
33 changed files with 608 additions and 121 deletions

View File

@@ -1,8 +1,11 @@
The shell runs a program by asking init to load it (init alone may
The shell runs /bin/<name> by asking init to load it (init alone may
create processes), then gives the program the terminal as its output
and a read-only storage grant to the current directory, writes its
arguments onto a page it moves into the program, starts it and waits
for it to die. Then it takes the grant back.
for it to die. Then it takes the grant back. Ctrl+C kills it.
Built-ins: help, echo, clear, cd, pwd. Anything else is a program on
disk: `name args...` runs name.elf.
A program that needs more says so in /bin/<name>.manifest, e.g.
`needs = display` for snake, which then gets the screen and keyboard
until it quits. A need the shell does not know, it refuses to run.
Built-ins: help, echo, clear, cd, pwd.