code wiki / (root) / nx_pe_container_uiserve.nx

nx_pe_container_uiserve.nx

buildroot/runtime/nx_pe_container_uiserve.nx

12811 B200 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind tooltopic pe
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_hal.nx nx_pe_writer.nx nx_pe_container_uiserve.nx

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

main nx_hal_alloc_pages nx_hal_active_shim nx_hal_alloc_pages_linux sys_mmap nx_hal_alloc_pages_bare_me nx_hal_alloc_pages_nishi_s nx_pe_emit_container_io _w16 _w32 _w8 _w64 _w32 ↻ _emit_section_header _w8 ↻ _w32 ↻ _w16 ↻ nxcwio_put_utf16 _w16 ↻ nx_pe_write_to_file sys_openat_wr sys_write sys_close sys_write ↻

structs

none

consts

28const PE_CWIO_FILE_SIZE: i64 = 0x800

functions

30func nxcwio_put_utf16(buf: *u8, off: i64, s: *u8) -> i64
called by 1: nx_pe_emit_container_io calls 1: _w16
40func nx_pe_emit_container_io(buf: *u8) -> i64
186func main() -> i64