MCPcopy Index your code
hub / github.com/nodejs/node / spawnChildProcess

Function spawnChildProcess

test/common/inspector-helper.js:15–31  ·  view source on GitHub ↗
(inspectorFlags, scriptContents, scriptFile)

Source from the content-addressed store, hash-verified

13const TIMEOUT = common.platformTimeout(15 * 1000);
14
15function spawnChildProcess(inspectorFlags, scriptContents, scriptFile) {
16 const args = [].concat(inspectorFlags);
17 if (scriptContents) {
18 args.push('-e', scriptContents);
19 } else {
20 args.push(scriptFile);
21 }
22 const child = spawn(process.execPath, args);
23
24 const handler = tearDown.bind(null, child);
25 process.on('exit', handler);
26 process.on('uncaughtException', handler);
27 process.on('unhandledRejection', handler);
28 process.on('SIGINT', handler);
29
30 return child;
31}
32
33function makeBufferingDataCallback(dataCallback) {
34 let buffer = Buffer.alloc(0);

Callers 1

constructorMethod · 0.85

Calls 5

concatMethod · 0.80
spawnFunction · 0.50
pushMethod · 0.45
bindMethod · 0.45
onMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…