You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
orly-repl: piped-stdin EOF aborts in-flight entries and process.exit truncates their output #542
Found by #539's docker gate (printf '40 + 2;\n:quit\n' | docker run -i ... repl printed no result and exited 0), reproduced outside docker — any piped, non-interactive use hits it:
EOF races the entry queue. Line handlers are serialized on a promise chain, but readline's close (stdin EOF) handler calls quit() immediately — closing the WebSocket and deleting the scratch dir while the first entry is still compiling/installing. The entry's rejection lands in the chain after quitting is set, and its prompt/result never print.
process.exit(0) truncates pending pipe writes. The aborted entry's error text goes to stderr via console.error, whose write to a pipe is asynchronous; process.exit drops it. So the failure is silent — exit 0, no output — which is what made the CI log useless (11s of work, then nothing).
Fix: chain quit() onto the entry queue so EOF means "quit after pending entries drain" (interactive :quit/Ctrl-D semantics unchanged), and replace process.exit(0) with process.exitCode + natural event-loop drain so output always flushes. The smoke gains a piped-EOF scenario (lines written, stdin closed immediately — the exact CI shape).
Activity
orly-repl: don't abort in-flight entries on stdin EOF; let exit flush (…
Merge pull request #543 from orlyatomics/fix/542-repl-eof-race
Merge master: pick up the #542 stdin-EOF fix the repl gate needs