Updates
This commit is contained in:
@@ -42,6 +42,8 @@ The following are set on `ctx` before the kernel starts (unless noted as overwri
|
||||
| **`runBinCommand(argv)`** | Runs a command with the **same** resolution rules as the interactive shell (used by **`time`**, **`xargs`**, and similar) |
|
||||
| **`registerKernelShutdownHook(fn)`** | Register an async or sync function to run when the REPL session ends, **before** initd disposers (`clearInterval`, …). See [`bare-initd.js`](../packages/bare-os-booter/lib/bare-initd.js) |
|
||||
|
||||
Kernel boot composition lives on the **system image** (`/boot/init.js`, `/etc/bare-os/rc`, `/etc/bare-os/rc.d/`), not on `ctx`—extend the image or hooks like `registerKernelShutdownHook` rather than adding boot fields to the context object.
|
||||
|
||||
After [`createKernelReplSession`](../packages/bare-os-booter/lib/repl-session.js) returns:
|
||||
|
||||
- **`ctx.execLine(line)`** runs a **full shell line** (tokenize, builtins, pipelines, `/bin` resolution)—this is what the default [`kernel/init.js`](../kernel/init.js) uses in its loop.
|
||||
|
||||
Reference in New Issue
Block a user