jabc has no process.exit)
Surfaced by JS-025. be <name> forks jabc bin/<name>.js; the script's exit becomes be's exit. But jabc exposes no process.exit(code), so a script can only signal 0 (clean return) or non-zero (an uncaught throw → exit 1). An extension that wants a specific exit code (e.g. be status-style "1 = dirty") cannot set it. Method: Issues.
be's exit code, but
jabc (js/main.cpp) only maps clean-return→0 / uncaught-exception→1.
bin/status.js reimplementation (the SDK-validation goal) wants the same
exit semantics as native be status (0 clean, non-zero dirty/ahead/behind).
process.exit(code) (and/or a process.exitCode settable global) to the
jabc runtime so a script can set its own process exit status.
be <name> then propagates that exact code (already wired by JS-025).js/main.cpp change; must still drain the event loop / run GC
deallocators before exit (the existing teardown order — context release before FILECloseAll). process.exit should flush + tear down cleanly, not _exit.
process.exitCode honored at
natural drain is the cleaner fit than an abrupt exit().
process.exitCode (read at end of run, Node-style) vs process.exit(n)
(immediate). Prefer exitCode to preserve the loop-drain + GC teardown.
be <name>.main.cpp (jabc→jab, JAB-001; js/ is now the
standalone runtime repo/submodule): honor process.exitCode when computing rc after the drain; update its INDEX.md + API.md.
process global carries
argv (JS-015) + version/build (VERSN) but NO exit/exitCode anywhere (main.cpp maps clean-return→0 / throw→1 only).