Skip to content

Fail on open if tcsetattr doesn't set bits/parity - #232

Merged
fhunleth merged 2 commits into
mainfrom
fail-if-tcsetattr-partially-fails
Oct 13, 2026
Merged

fhunleth merged 2 commits into
mainfrom
fail-if-tcsetattr-partially-fails

Conversation

@fhunleth

@fhunleth fhunleth commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

This fixes a confusing situation where opening a pseudo-terminal would
"work" the first time and then fail afterwards if requesting 7 data bits
and parity. Pseudo-terminals only support 8n1, so the subsequent
failures were correct but unexpected.

This could catch other silent failures that appeared to work in the
past.

Fixes #226

This fixes a confusing situation where opening a pseudo-terminal would
"work" the first time and then fail afterwards if requesting 7 data bits
and parity. Pseudo-terminals only support 8n1, so the subsequent
failures were correct but unexpected.

This could catch other silent failures that appeared to work in the
past.
This verifies the previous commit that detects tcsetattr failures.
@fhunleth
fhunleth merged commit a159a1c into main Oct 13, 2026
10 checks passed
@fhunleth
fhunleth deleted the fail-if-tcsetattr-partially-fails branch October 13, 2026 19:19
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.

open/3 returns {:error, :einval} on a pty when parity or data bits are set a second time

1 participant