nx_lock_reap.nx
buildroot/runtime/nx_lock_reap.nx
about
nx_lock_reap.nx -- CLI of the sovereign stale-lock reaper (R-ORCH-2a). Reaps ONE abandoned lock
so a crashed workstream never blocks its siblings -- the janitorial pillar of the orchestration
north-star, as an organ (never the ps|grep|rm shell sin).
usage: nx_lock_reap <lockpath> <max_age_s> <owner_needle> [dry]
owner_needle = a substring of the owner process's /proc cmdline (e.g. "nx_mgmt_api", "git");
pass "-" for no owner-check (age-only, for cross-boundary locks where /proc can't see the owner).
Reaps iff exists AND owner not alive AND age > max_age_s. dry -> report only. Always exits 0
(a reaper must never fail its cron); appends a line to knowledge/status/lock_reap.log.
license_tier: ORIGINAL expect_exit: 0
dependencies 2 imports · 0 importers
imports: nx_syscalls.nxnx_lock_reap_core.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
| 12 | const K_MAGIC_1024: i64 = 1024 |
functions
| 14 | func r_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 15 | func r_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 } called by 1: main |
| 17 | func main(argc: i64, argv: *i64) -> i64 |