MCPcopy
hub / github.com/codeaashu/claude-code / registerProcessOutputErrorHandlers

Function registerProcessOutputErrorHandlers

src/utils/process.ts:12–15  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

10
11// Prevents memory leak when pipe is broken (e.g., `claude -p | head -1`)
12export function registerProcessOutputErrorHandlers(): void {
13 process.stdout.on('error', handleEPIPE(process.stdout))
14 process.stderr.on('error', handleEPIPE(process.stderr))
15}
16
17function writeOut(stream: NodeJS.WriteStream, data: string): void {
18 if (stream.destroyed) {

Callers 1

runHeadlessFunction · 0.85

Calls 2

handleEPIPEFunction · 0.85
onMethod · 0.80

Tested by

no test coverage detected