code wiki / (root) / nx_torrent_keep_gate.nx

nx_torrent_keep_gate.nx

buildroot/runtime/nx_torrent_keep_gate.nx

5597 B104 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind gate/prooftopic torrent
docsdependenciesstructsconstsfunctions

about

nx_torrent_keep_gate.nx -- SOVEREIGN proof that the local keeper (nx_torrent_keep) supervises the media daemon: with the keeper running, KILLING the daemon results in it being RESPAWNED with a NEW live pid. This is the measured, re-runnable S-class regression guard for the workstation-local death-respawn supervision that brings the local daemon to NAS-parity (the NAS already has nx_hostctl). The whole scenario runs in ONE process so it is not affected by cross-call WSL VM recycling. Run: build the keeper elf first (nx_sov_build_run.elf nx_torrent_keep --build-only), then run this gate. license_tier: ORIGINAL layer: gate over the L7 keeper module: nishi-core.torrent.keep_gate depends: nishi-core.syscalls

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gate_verdict.nx nx_torrent_keep_gate.nx

imports: nx_syscalls.nxnx_gate_verdict.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap g_ensure_up sys_fork sys_openat_wr sys_dup3 sys_mmap ↻ sys_execve sys_exit sys_wait4 g_read_pid sys_openat_rd sys_mmap ↻ sys_read sys_close g_alive nx_kill g_report g_puts sys_write g_puts ↻ g_putn sys_mmap ↻ sys_write ↻ sys_fork ↻ sys_openat_wr ↻ sys_dup3 ↻ sys_execve ↻ sys_exit ↻ sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill ↻ gv_ctr sys_mmap ↻ gv_verdict gv_puts sys_write ↻ gv_num sys_mmap ↻

structs

none

consts

none

functions

14func g_puts(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 2: g_reportmain calls 1: sys_write
15func g_putn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
22func g_report(label: *u8, ok: i64) -> i64
called by 1: main calls 1: g_puts
26func g_read_pid(path: *u8) -> i64
34func g_alive(pid: i64) -> i64 { if pid <= 0 { return 0 } if nx_kill(pid, 0) == 0 { return 1 } return 0 }
called by 1: main calls 1: nx_kill
36func g_ensure_up(envp: *i64) -> i64
49func main() -> i64