Skip to content

fix: handle more ways the output can be closed - #1480

Merged
dsherret merged 2 commits into
mainfrom
fix/closed-pipe-errors
Nov 29, 2026
Merged

dsherret merged 2 commits into
mainfrom
fix/closed-pipe-errors

Conversation

@dsherret

Copy link
Copy Markdown
Member

Follow-up to #1479.

  • Closed sockets: ConnectionReset and ConnectionAborted are now treated like a broken pipe. Node.js uses sockets for a child process's output on Unix, so a Node.js parent that stopped reading made check print an error and exit with 1 instead of 20, and made fmt fail when only stderr was closed.
  • Disconnected named pipes on Windows: the same for ERROR_PIPE_NOT_CONNECTED (233), which Rust has no error kind for.
  • Editor service: it exits with 1 after failing to write its logs for some other reason (ex. a full disk). It exits directly, so it skipped that check.
  • Tests: adds integration tests that run the binary with closed and full outputs, because the unit tests replace the error handler and so didn't cover what the process does.

Tested on Windows and Linux. The named pipe case has a unit test for the error code, and was tested manually with a pipe disconnected by its reader.

@dsherret
dsherret merged commit 4a383af into main Nov 29, 2026
6 checks passed
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