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

Method onChildOutput

lib/internal/debugger/inspect_probe.js:528–549  ·  view source on GitHub ↗
(text, which)

Source from the content-addressed store, hash-verified

526 }
527
528 onChildOutput(text, which) {
529 if (which !== 'stderr') { return; }
530 debug('child stderr: %j', text);
531
532 this.childStderr += text;
533
534 const combined = this.disconnectSentinelBuffer + text;
535 // Detect the disconnect sentinel.
536 if (this.connected &&
537 StringPrototypeIncludes(combined, kProbeDisconnectSentinel)) {
538 debug('disconnect sentinel detected, resetting client');
539 this.disconnectRequested = true;
540 this.client.reset();
541 }
542
543 if (combined.length > kProbeDisconnectSentinel.length) { // Slide the buffer.
544 this.disconnectSentinelBuffer = StringPrototypeSlice(combined,
545 combined.length - kProbeDisconnectSentinel.length);
546 } else {
547 this.disconnectSentinelBuffer = combined;
548 }
549 }
550
551 onChildExit(code, signal) {
552 debug('child exit: code=%s signal=%s connected=%s started=%s finished=%s inFlight=%j',

Callers

nothing calls this directly

Calls 2

debugFunction · 0.50
resetMethod · 0.45

Tested by

no test coverage detected