code wiki / (root) / nx_proc_ctl_cmdl.nx

nx_proc_ctl_cmdl.nx

buildroot/runtime/nx_proc_ctl_cmdl.nx

3800 B67 linesdepth 2pulls 2 transitivereach 1 importersview sourcekind librarytopic proc
docsdependenciesstructsconstsfunctions

about

nx_proc_ctl.nx -- canonical sovereign process control: kill by FULL /proc/<pid>/cmdline. THE one true copy that replaces (a) nx_proc_kill.nx's /proc/<pid>/comm match -- the 15-char-TRUNCATED field that silently matched nothing for long names = the 2026-06-29 gallery-login disaster -- and (b) the buried-in-nx_hostctl hc_kill_by_cmdline. IMPORTABLE (no main, no self-test). Matches "/"+name -> the binary PATH, never an arg mention (so it can't kill its own command line); signal is a parameter (9=SIGKILL, 15=SIGTERM); returns the HONEST killed count (0 => nothing matched => the op did nothing). Bounded reader (fixed reused buffers; no sys_read_file 4GiB-per-call leak). license_tier: ORIGINAL

dependencies 1 imports · 1 importers

nx_syscalls.nx nx_proc_ctl_cmdl.nx nx_proc_ctl_gate.nx

imports: nx_syscalls.nx

imported by: nx_proc_ctl_gate.nx

structs

none

consts

9const K_MAGIC_65536: i64 = 65536
10const K_MAGIC_8192: i64 = 8192
11const K_MAGIC_8191: i64 = 8191

functions

14func nx_pctl_cmdl_has(buf: *u8, n: i64, name: *u8) -> i64
30func nx_pctl_kill_by_cmdline(name: *u8, sig: i64) -> i64