code wiki / (root) / nx_pe_job_run_test.nx

nx_pe_job_run_test.nx

buildroot/runtime/nx_pe_job_run_test.nx

14443 B232 linesdepth 4pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic pe
docsdependenciesstructsconstsfunctions

about

nx_pe_job_run_test.nx -- W2c: minimal sovereign Windows CONTAINER RUN, native, no HCS/VM. The W2 capstone: ONE native PE that composes the whole governed-container-run pipeline -- the blueprint nx_container_win (W4) will emit. Job boundary (W2a) + limit (W2b) + spawn/wait/reap (W0): 1. CreateJobObjectW(NULL,NULL) -> hJob 2. SetInformationJobObject(hJob, 2, &basic{ActiveProcessLimit=8}, 0x40) (governance installed) 3. AssignProcessToJobObject(hJob, (HANDLE)-1) (self joins the job) 4. CreateProcessW(NULL,"cmd.exe /c exit 7",...,CREATE_NO_WINDOW,...,&si,&pi) (workload; auto-joins job) 5. WaitForSingleObject(pi.hProcess, INFINITE) 6. GetExitCodeProcess(pi.hProcess, &code) 7. ExitProcess(code) -> 7 == governed workload ran & was reaped PROOF: exit 7 == the child workload ran to completion INSIDE our limit-configured Job Object and we reaped its real exit code. (Enforcement itself is proven separately + no-false-green in W2b; this rung proves the composed run+reap pipeline + exit-code propagation under governance.) 7 kernel32 imports. 3 sections. Founded on nx_pe_writer.nx (hand byte-layout, tutor-scaffold). genealogy_id: win32_job_objects_2000 + runc_init_2014 + lmctfy_2013 lineage_id: substrate_pe_jobrun_v1

dependencies 3 imports · 0 importers

nx_syscalls.nx nx_hal.nx nx_pe_writer.nx nx_pe_job_run_test.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_job_run _w16 _w32 _w8 _w64 _w32 ↻ _emit_section_header _w8 ↻ _w32 ↻ _w16 ↻ nx_pe_write_to_file sys_openat_wr sys_write sys_close sys_write ↻

structs

none

consts

25const PE_JOBRUN_FILE_SIZE: i64 = 0x800

functions

29func nx_pe_emit_job_run(buf: *u8) -> i64
217func main() -> i64