nx_pe_container_httpd.nx
buildroot/runtime/nx_pe_container_httpd.nx
about
nx_pe_container_win_io.nx -- W4-b-1: a governed Nishi container with WIRED stdout.
W4-a (nx_pe_container_win) ran a Nishi organ as a Job-governed child and reaped exit 88, but the
organ's "NX" stdout was lost (CreateProcessW used bInheritHandles=FALSE + CREATE_NO_WINDOW). This
rung wires container output: the child inherits the supervisor's stdout, so the organ's output is
CAPTURED -- making the container usable for real services that log to stdout (Elder-AI svcs do).
CHANGE vs W4-a (two immediates only; everything else byte-identical):
- CreateProcessW arg5 bInheritHandles: FALSE(0) -> TRUE(1) ([rsp+0x20])
- CreateProcessW arg6 dwCreationFlags: CREATE_NO_WINDOW(0x08000000) -> 0 ([rsp+0x28])
With handle inheritance on and no NO_WINDOW, the child (console app) inherits the supervisor's
stdout handle, so its writes flow to wherever the supervisor's stdout points (console or file).
Pipeline (same governed run+reap as W2c/W4-a): CreateJobObjectW -> SetInformationJobObject(limit=8)
-> AssignProcessToJobObject(self,-1) -> CreateProcessW("nx_win_compiled_organ.exe", inherit=TRUE,
flags=0) -> WaitForSingleObject(INFINITE) -> GetExitCodeProcess -> ExitProcess(childExit).
NO-FALSE-GREEN: the organ prints "NX\n" and exits 88. With output wired, BOTH must hold: stdout
captures "NX" (container output flows out) AND supervisor exit == 88 (governed child reaped). The
W4-a non-existent-child control (-> exit 0, rep-stosq-25 zeroes exitCode) still applies.
lineage_id: substrate_pe_container_win_io_v1 (evolves substrate_pe_container_win_v1).
dependencies 3 imports · 0 importers
imports: nx_syscalls.nxnx_hal.nxnx_pe_writer.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| 28 | const PE_CWIO_FILE_SIZE: i64 = 0x800 |
functions
| 30 | func nxcwio_put_utf16(buf: *u8, off: i64, s: *u8) -> i64 |
| 40 | func nx_pe_emit_container_io(buf: *u8) -> i64 |
| 186 | func main() -> i64 |