code wiki / (root) / nx_motion_smoke.nx

nx_motion_smoke.nx

buildroot/runtime/nx_motion_smoke.nx

2795 B47 linesdepth 3pulls 3 transitivereach 0 importersview sourcekind smoketopic motion
docsdependenciesstructsconstsfunctions

about

nx_motion_smoke.nx -- DIAGNOSE AND GATE THE /motion DAEMON'S LISTEN (2026-09-06, rung MO14 core). The deploy health probe reports NEVER-LISTENED but hides the daemon's OWN stderr, and a daemon cannot be nx_job_run (jlb_denied) to capture it. This oneshot forks the daemon BINARY on a throwaway port with a bounded watchdog (gk_run_capture_ms kills it at the deadline), captures its stdout+stderr, and reports whether it bound -- so 'does the daemon listen' becomes a runnable, gateable check instead of a deploy gamble. nx_motion_smoke [elf] [port] elf defaults to ./nx_motion_serve.elf.new, port to a throwaway 28139 exit: 0 LISTENED | 3 BIND-FAILED (port taken / bind refused) | 4 NO-OUTPUT (crashed before printing) Its name carries no control-plane stem, so the async launcher admits it; it binds nothing itself. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_gatekit_lib.nx nx_motion_smoke.nx

imports: nx_syscalls.nxnx_gatekit_lib.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 nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gk_run_capture_ms gk_run_cap3 sys_mmap ↻ sys_pipe2 sys_fork sys_close sys_setpgid sys_openat_rd sys_dup3 sys_execve sys_exit ↻ sys_sleep_ms sys_mmap ↻ sys_munmap nx_kill sys_now_realtime_ms sys_mmap ↻ sys_clock_gettime_real sys_poll sys_read sys_wait4 gk_wait_code wait_status_rc wait_term_signal

structs

none

consts

13const SM_CAP: i64 = 65536
14const SM_MS: i64 = 2500

functions

16func smw(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 1: main calls 1: sys_write
17func smn(v: i64) -> i64
called by 1: main calls 2: sys_mmapsys_write
30func main(argc: i64, argv: *i64) -> i64