code wiki / _hdl_build / nx_pr_mock.nx
nx_pr_mock.nx source
↩ module page · 10 lines · 500 B
1// nx_pr_mock.nx -- a tiny sovereign killable target for the recovery-executor gate. Sleeps so the gate can
2// verify alive -> proc_kill_by_name -> dead. Distinct cmdline ("nx_pr_mock") so the kill can't self-match the
3// gate/executor. license_tier: ORIGINAL
4import "nx_syscalls.nx"
5func main() -> i64 {
6 let ts: *i64 = sys_mmap(16) as *i64
7 ts[0] = 120; ts[1] = 0 // 120s timespec (gate kills it well before)
8 __syscall(35, ts as i64, 0, 0, 0, 0, 0) // nanosleep
9 return 0
10}