Expand description
Node process global — the subset packages read at load time.
Data properties (process.env, process.argv, process.platform, the
stdout/stderr stream stand-ins, …) are served through constant;
callable members (process.cwd(), process.hrtime(), the EventEmitter-style
on/emit no-ops, …) through call. process.nextTick is intentionally NOT
handled here — it stays on the core microtask path in builtins.rs.
Constants§
- METHODS
- NODE_
VERSION - Callable members.
nextTickis deliberately absent (handled inbuiltins). The node release this runtime reports itself as:process.version,process.versions.node, and theNode.js <version>line that ends a fatal-exception report. - STDIN_
ITERATOR_ METHODS - The methods of the async iterator
for await (const chunk of process.stdin)reads.
Functions§
- call
- constant
- emit_
before_ exit - Emit
process.on('beforeExit', code). Node fires this when the loop has drained but the process has NOT been told to exit, and — unlikeexit— work scheduled from a handler is honoured, so the loop runs again andbeforeExitcan fire repeatedly. It never fires after an explicitprocess.exit()or an uncaught exception. - emit_
deprecation_ warning - A
DeprecationWarningfires at most once percodeper process, matching thewarnedlatches Node keeps at each deprecation site. - emit_
exit_ event - Emit
process.on('exit', code)exactly once per process, the way Node’sprocess._exitinglatch does —process.exit()inside anexithandler must not re-enter it. - emit_
warning - Port of
internal/process/warning.jsemitWarning: the warning is delivered on the NEXT TICK, not inline — first node’s defaultonWarningprinter, then everyprocess.on('warning')listener with the warningError(name,message, andcode/detailwhen given). It used to print synchronously, ahead of output the script wrote after the call, and thewarningevent never fired.--no-warnings(and--no-deprecationfor deprecations) silences only the printer, as in node. - eval_
entry - install_
argv - Publish Node’s
process.argv/process.execArgvsplit for this run, read off the real command line. Called once by thenodebinary’s entry point; first call wins. - memory_
usage_ rss process.memoryUsage.rss()— the same figure without building the object.- set_
exit_ code - The
process.exitCodesetter, ported from Node’slib/internal/bootstrap/node.jsaccessor: - signal_
number - A signal NAME (
"SIGKILL", case-insensitive) to its number, orNoneif the name is not one this platform defines. - stdin_
iterator_ call - stream_
instance_ call - Instance methods of a
process.stdout/stderrWriteStream:write/endemit the chunk raw (no newline) to the stream’s fd, so ordering interleaves correctly withconsole.log.