nx_pe_job_run_test.nx
buildroot/runtime/nx_pe_job_run_test.nx
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
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
| 25 | const PE_JOBRUN_FILE_SIZE: i64 = 0x800 |
functions
| 29 | func nx_pe_emit_job_run(buf: *u8) -> i64 |
| 217 | func main() -> i64 |