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

Function stdioStringToArray

lib/internal/child_process.js:238–253  ·  view source on GitHub ↗
(stdio, channel)

Source from the content-addressed store, hash-verified

236};
237
238function stdioStringToArray(stdio, channel) {
239 const options = [];
240
241 switch (stdio) {
242 case 'ignore':
243 case 'overlapped':
244 case 'pipe': ArrayPrototypePush(options, stdio, stdio, stdio); break;
245 case 'inherit': ArrayPrototypePush(options, 0, 1, 2); break;
246 default:
247 throw new ERR_INVALID_ARG_VALUE('stdio', stdio);
248 }
249
250 if (channel) ArrayPrototypePush(options, channel);
251
252 return options;
253}
254
255function ChildProcess() {
256 FunctionPrototypeCall(EventEmitter, this);

Callers 2

forkFunction · 0.85
getValidStdioFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…