The process module provides two process-level operations: exiting the
app and relaunching it — a port of @tauri-apps/api/process. The module
exports the standalone functions exit / relaunch and the aggregate
object process.
exit(code = 0) terminates the app with the given exit code;
relaunch() restarts best-effort: the host respawns itself detached and
the current process terminates (in a packaged app the launcher respawns
the full host + backend pair).
process is a framework built-in: its plugin:process|* commands are
granted by the core:default permission set in a capability;
core:allow-process_<cmd> (e.g. core:allow-process_exit) grants
single commands. No scope.
exit/relaunch terminate the current process when called, so the
hello example only verifies command registration without invoking them
(the first two lines are taken from
examples/hello/frontend/src/main.ts, verification anchor PROCESS_OK;
the usage part is illustrative):
plugin:process|* totals 2 commands: exit, relaunch. Full list
in the Commands Reference.
Applicable version: ztron 0.3.1