code wiki / _hdl_build / nx_proc_ctl_hb.nx

nx_proc_ctl_hb.nx

buildroot/runtime/_hdl_build/nx_proc_ctl_hb.nx

4943 B96 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind orphan librarytopic proc
docsdependenciesstructsconstsfunctions

about

nx_proc_ctl.nx -- shared sovereign /proc process control: kill-by-name + alive-by-name, EXTRACTED VERBATIM from the proven nx_hostctl scanners so the Publisher's recovery executor reuses them WITHOUT importing the whole supervisor (DRY; nx_hostctl can adopt this later). Matches /proc/<pid>/cmdline. No shell, no pkill. CRITICAL (nx_hostctl lesson): BOUNDED cmdline read into a REUSED buffer, NEVER sys_read_file (4GiB-mmap/call leak -> the next fork ENOMEMs = the old F-class supervisor death). license_tier: ORIGINAL

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_proc_ctl_hb.nx

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

8func pc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
9func pc_atoi(s: *u8) -> i64 { var v: i64=0; var i: i64=0; while s[i]!=(0 as u8) { let c: u8=s[i]; if c<(48 as u8){return v} if c>(57 as u8){return v} v=v*10+((c-(48 as u8)) as i64); i=i+1 } return v }
called by 1: proc_kill_by_name
10func pc_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64
16func pc_read_cmdline(path: *u8, buf: *u8, cap: i64) -> i64
27func proc_kill_by_name(needle: *u8, sig: i64) -> i64
63func proc_alive_by_name(needle: *u8) -> i64