code wiki / (root) / nx_daemon.nx

nx_daemon.nx

buildroot/runtime/nx_daemon.nx

1521 B26 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic daemon
docsdependenciesstructsconstsfunctions

about

nx_daemon.nx -- canonical sovereign detached-spawn: launch an elf as a daemon that survives the parent (new session via setsid), the sovereign run_in_background. Importable (no main). fork -> child setsid()s then execve()s; parent gets the child pid. Same sys_fork/nx_setsid/sys_execve nx_hostctl uses to supervise its NAS daemons. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_syscalls.nx nx_daemon.nx nx_daemon_gate.nx nx_daemon_run.nx nx_mineworld_mp_up.nx nx_servicectl.nx

imports: nx_syscalls.nx

imported by: nx_daemon_gate.nxnx_daemon_run.nxnx_mineworld_mp_up.nxnx_servicectl.nx

structs

none

consts

none

functions

9func daemon_spawn(elf: *u8, argv: *i64) -> i64
26func daemon_argv0(elf: *u8, argv: *i64) -> i64 { argv[0] = elf as i64; argv[1] = 0; return 0 }
called by 2: mainmain