node/typings/internalBinding
Yagiz Nizipli 2ab9848fe4
child_process: pass spawn options to the binding positionally
ChildProcess.prototype.spawn() handed a single options object to the
ProcessWrap::Spawn() binding, which then read about a dozen properties
back out individually with Object::Get(). Each of those is a property
lookup across the JS/C++ boundary on every spawn.

Pass file, args, cwd, envPairs, stdio, uid and gid as positional
arguments and pack the boolean flags (detached, windowsHide,
windowsVerbatimArguments) into a single integer whose bit values are
exported from the binding as `constants`. The native side then reads
each value directly from the call arguments.

Add internal typings for the process_wrap binding (previously untyped)
describing the new positional spawn() signature and the exported
constants.

There is no observable behavior change. Spawn wall-clock time is
dominated by the operating system process-creation cost and is
unchanged; this reduces the per-spawn work done on the main thread and
clarifies the contract between the JS and C++ layers.

Signed-off-by: Yagiz Nizipli <yagiz@nizipli.com>
PR-URL: https://github.com/nodejs/node/pull/63930
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Daniel Lemire <daniel@lemire.me>
2026-06-20 17:51:44 +02:00
..
async_context_frame.d.ts typings: improve internal binding types 2025-08-02 05:43:00 +00:00
async_wrap.d.ts async_hooks,inspector: implement inspector api without async_wrap 2024-01-24 13:29:28 +00:00
blob.d.ts typings: remove no longer valid FixedSizeBlobCopyJob type 2025-05-22 09:48:29 +00:00
buffer.d.ts buffer: add end parameter 2026-05-05 16:19:26 +02:00
cjs_lexer.d.ts build,deps: replace cjs-module-lexer with merve 2026-01-28 07:29:58 +00:00
config.d.ts lib,src,test: fix tests without SQLite 2025-12-11 23:04:24 +01:00
constants.d.ts typings: improve internal binding types 2025-08-02 05:43:00 +00:00
debug.d.ts src,test: ensure that V8 fast APIs are called 2024-08-13 12:37:02 +00:00
encoding_binding.d.ts lib: implement all 1-byte encodings in js 2025-12-30 18:56:47 +00:00
fs.d.ts fs: improve cpSync no-filter copyDir performance 2025-06-07 14:44:25 +00:00
fs_dir.d.ts typings: apply lint 2024-07-29 21:19:58 +00:00
http_parser.d.ts typings: add missing properties in HTTPParser 2025-10-18 03:36:53 +00:00
icu.d.ts typings: improve internal binding types 2025-08-02 05:43:00 +00:00
inspector.d.ts inspector: initial support for Network.loadNetworkResource 2025-07-10 12:34:11 +00:00
ipc_serdes.d.ts child_process: serialize advanced IPC messages natively 2026-06-20 16:58:11 +02:00
locks.d.ts worker: add web locks api 2025-07-18 07:55:10 -07:00
messaging.d.ts src: remove unused checkMessagePort internal binding 2025-05-12 21:44:58 +00:00
modules.d.ts src: cache missing package.json files in the C++ package config cache 2026-01-20 13:02:25 +00:00
options.d.ts src: nuke deprecated and un-used enum members in OptionEnvvarSettings 2024-11-05 20:44:24 +00:00
os.d.ts typings: add missing properties in ConfigBinding 2025-09-08 16:12:56 +00:00
process.d.ts process: add threadCpuUsage 2025-02-21 14:14:02 +00:00
process_wrap.d.ts child_process: pass spawn options to the binding positionally 2026-06-20 17:51:44 +02:00
quic.d.ts typings: fix typo on quic onSessionDatagram 2024-07-29 04:52:07 +00:00
sea.d.ts typings: improve internal binding types 2025-08-02 05:43:00 +00:00
serdes.d.ts lib: fix internalBinding typings 2023-09-23 10:48:34 +00:00
string_decoder.d.ts typings: add typing for string_decoder 2026-01-16 01:14:30 +00:00
symbols.d.ts typings: improve internal binding types 2025-08-02 05:43:00 +00:00
timers.d.ts lib: fix internalBinding typings 2023-09-23 10:48:34 +00:00
types.d.ts typings: update 'types' binding 2025-09-24 14:11:47 +00:00
url.d.ts typings: add missing URLBinding methods 2025-08-21 20:39:21 +00:00
url_pattern.d.ts url: add URLPattern implementation 2025-02-01 02:13:57 +00:00
util.d.ts lib,src: isInsideNodeModules should test on the first non-internal frame 2025-12-10 13:59:35 +00:00
uv.d.ts typings: add typing for 'uv' 2025-09-08 16:13:05 +00:00
wasi.d.ts typings: provide internal types for wasi bindings 2024-08-24 16:59:17 +00:00
worker.d.ts typings: add missing properties and method in Worker 2025-10-18 03:36:53 +00:00
zlib.d.ts typings: remove unused imports 2025-09-15 15:54:23 +00:00