mirror of
https://github.com/ruvnet/RuView.git
synced 2026-10-19 05:10:13 -05:00
fix(nightly-sota): ignore stdin EPIPE from children that never read input
runProcess() ends the child's stdin with no error handler. A child that never reads stdin (git check-ignore) can exit and close the pipe before the write flushes; the unhandled EPIPE then crashes `agent.mjs validate`. This failed harness/ruview (node 22) on PR #2062 and reproduces 12/12 locally under CPU load (0/12 after this change). The command's real outcome is still reported by the 'close' handler; this mirrors the existing handler in harness/ruview/src/process-runner.js. Co-Authored-By: claude-flow <ruv@ruv.net> Claude-Session: https://claude.ai/code/session_015H55jmprfz4oHWXSFbX5rf
This commit is contained in:
1 file changed
+4
@@ -135,6 +135,10 @@ async function runProcess(command, args, {
|
|||||||
resolve(result);
|
resolve(result);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// A child that never reads stdin (e.g. `git check-ignore`) may exit and
|
||||||
|
// close the pipe before this write flushes; the resulting EPIPE is not a
|
||||||
|
// failure of the command, whose real outcome the 'close' handler reports.
|
||||||
|
child.stdin.on('error', () => {});
|
||||||
child.stdin.end(input);
|
child.stdin.end(input);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user