code wiki / (root) / nx_fd_hygiene_gate.nx

nx_fd_hygiene_gate.nx

buildroot/runtime/nx_fd_hygiene_gate.nx

2356 B48 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/proof
docsdependenciesstructsconstsfunctions

about

nx_fd_hygiene_gate.nx -- prove nx_fd_scrub_inherited() closes inherited fds >= 3 while PRESERVING stdio. This is the regression tooth for the mgmt :18098 fd-leak cure (2026-07-17): if the scrub ever stops closing inherited fds, a supervisor would leak listen sockets into its children again. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_fd_hygiene.nx nx_syscalls.nx nx_fd_hygiene_gate.nx

imports: nx_fd_hygiene.nxnx_syscalls.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main w sys_write sys_openat_rd pn sys_mmap sys_write ↻ nx_fd_scrub_inherited sys_close sys_close ↻ sys_exit

structs

none

consts

none

functions

8func w(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 1: main calls 1: sys_write
9func pn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
19func main() -> i64