nx_proc_ctl.nx
buildroot/runtime/nx_proc_ctl.nx
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 · 11 importers
diagram shows first 10 each side; +0 more imports, +1 more importers in the complete lists below.
imports: nx_syscalls.nx
imported by: nx_adopt.nxnx_ctxtop.nxnx_memvel.nxnx_mvault_walk.nxnx_orphan_reap.nxnx_orphan_reap_gate.nxnx_poolwidth_lib.nxnx_proc_kill.nxnx_pub_recover_exec.nxnx_resmon.nxnx_servicectl.nx
structs
| none |
consts
| 7 | const K_MAGIC_65536: i64 = 65536 |
| 8 | const K_MAGIC_8192: i64 = 8192 |
functions
| 10 | func pc_slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 11 | func 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 } |
| 12 | func pc_contains(hay: *u8, hn: i64, needle: *u8, nn: i64) -> i64 |
| 18 | func pc_read_cmdline(path: *u8, buf: *u8, cap: i64) -> i64 |
| 29 | func proc_kill_by_name(needle: *u8, sig: i64) -> i64 called by 2: nx_pctl_kill_by_cmdlinepe_exec calls 12: pc_slensys_openat_rdsys_mmapsys_getdents64dirent_reclendirent_name+6 |
| 67 | func proc_kill_by_name_except(needle: *u8, sig: i64, keep: i64) -> i64 |
| 114 | func pc_line_protected(cl: *u8, cln: i64, deny: *u8, denyn: i64) -> i64 |
| 133 | func proc_kill_protected(needle: *u8, sig: i64, keep: i64, deny: *u8, denyn: i64, out: *i64) -> i64 called by 2: mainmain calls 13: pc_slensys_openat_rdsys_mmapsys_getdents64dirent_reclendirent_name+7 |
| 179 | func proc_count_by_name(needle: *u8) -> i64 |
| 215 | func proc_alive_by_name(needle: *u8) -> i64 |
| 261 | func nx_pctl_kill_by_cmdline(name: *u8, sig: i64) -> i64 |