Skip to content

fix(runtime): give process stdin Linux semantics - #2046

Merged
eersnington merged 3 commits into
mainfrom
fix/process-stdin-semantics
Oct 20, 2026
Merged

eersnington merged 3 commits into
mainfrom
fix/process-stdin-semantics

Conversation

@eersnington

@eersnington eersnington commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Process stdin now fails the way a Linux pipe does, the same in both clients.

Call main This PR
Write after the process exits Rust: untyped invalid_state. TypeScript: OK, bytes dropped EPIPE
Write after closeStdin OK, bytes dropped EBADF, from the sidecar
Spawn a process that must see EOF Rust stream_stdin existed but nothing read it. No TypeScript option streamStdin: false (TypeScript), stream_stdin: Some(false) (Rust)
  • Closing stdin after the process exits succeeds.
  • TypeScript exec ignores EPIPE when it feeds stdin to a command that exits without reading it, as echo x | true succeeds on Linux.
  • The sidecar records a closed host stdin and rejects later writes with a new SidecarError::Errno, so the errno reaches the client as the error code. Both clients return it as a kernel error (code: "EBADF") and leave the process running; its wait still returns its exit code.

This is part 4 of 6 in a stack:

@eersnington
eersnington force-pushed the fix/process-stdin-semantics branch from 3d5dffa to 46c751f Compare October 19, 2026 21:43
@eersnington
eersnington force-pushed the fix/process-stdin-semantics branch from 46c751f to c8fbe51 Compare October 19, 2026 23:39
@eersnington
eersnington added this pull request to stack #2054 October 19, 2026 23:57
@eersnington eersnington changed the title fix: give process stdin Linux semantics fix(runtime): give process stdin Linux semantics Oct 20, 2026
@eersnington
eersnington force-pushed the fix/process-stdin-semantics branch 2 times, most recently from 9d632e3 to f4630b0 Compare October 20, 2026 00:08
Base automatically changed from fix/v8-diagnostics-tracing to main October 20, 2026 00:08
@eersnington
eersnington force-pushed the fix/process-stdin-semantics branch from f4630b0 to 1f6b222 Compare October 20, 2026 00:08
@eersnington
eersnington merged commit a00bbaf into main Oct 20, 2026
2 checks passed
@eersnington
eersnington deleted the fix/process-stdin-semantics branch October 20, 2026 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant