nx_torrent_up.nx
buildroot/runtime/nx_torrent_up.nx
about
nx_torrent_up.nx -- SOVEREIGN bring-up + lifecycle for the /torrent UI stack (X-TORRENT-UI-002).
REPLACES the (forbidden) bash bring-up entirely. Pure NishiLang orchestration -- sys_fork / execve /
wait4 / kill + openat/read/write. NO bash, NO sh, NO pkill/curl/nohup/timeout. It builds the three
organs through the WOMB in --build-only mode (so a worker's live-download side effect never fires),
then launches the daemon detached and records its pid so it can be stopped sovereignly.
nx_torrent_up -> build-if-missing (worker, discover, daemon) then launch daemon (idempotent)
nx_torrent_up down -> kill the daemon by pidfile + signal any worker to self-stop
nx_torrent_up status -> report whether the daemon process is alive
Run it the sovereign way: ./_offc/nx_sov_build_run.elf nx_torrent_up (WOMB builds + runs this = bring-up)
license_tier: ORIGINAL layer: L7 (supervises the L6 daemon over the L4/L5 organs)
module: nishi-core.torrent.up
depends: nishi-core.syscalls
dependencies 1 imports · 0 importers
imports: nx_syscalls.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
| none |
functions
| 17 | func tu_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 } |
| 18 | func tu_putn(v: i64) -> i64 |
| 27 | func tu_streq(a: *u8, b: *u8) -> i64 called by 1: main |
| 33 | func tu_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd < 0 { return 0 } sys_close(fd); return 1 } |
| 35 | func tu_mtime(path: *u8) -> i64 |
| 43 | func tu_need_build(src: *u8, elf: *u8) -> i64 |
| 51 | func tu_write_pid(path: *u8, pid: i64) -> i64 |
| 62 | func tu_read_pid(path: *u8) -> i64 |
| 72 | func tu_build(womb: *u8, name: *u8, envp: *i64) -> i64 |
| 83 | func main(argc: i64, argv: *i64) -> i64 |