Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move stderr of stty to pipe #13

Merged
merged 1 commit into from
Mar 20, 2022
Merged

Move stderr of stty to pipe #13

merged 1 commit into from
Mar 20, 2022

Conversation

bradrn
Copy link
Contributor

@bradrn bradrn commented Jul 11, 2019

In certain scenarios, stty can error out; as the std_err configuration value of the relevant process is unset, any error messages from stty are output to the console. This usually does not occur, but if a program using terminal-size is run in e.g. an emacs shell buffer, these errors are output, as stty can’t run in this environment. This is not normally a problem, but I would argue it comes under the heading of ‘unexpected behaviour’ and so should probably be fixed. This problem also causes bug commercialhaskell/stack#4901 in stack, which stops many people from using the Intero development environment.

If stderr is left as its default value, any error messages arising from
stty are output to the stderr of the program calling `size`, causing
strange messages if stty fails.
@gdziadkiewicz
Copy link
Contributor

@supki @dmalikov Could you help in getting this one-liner merged and released? As mentioned by @bradrn it has surprisingly big impact.

@supki supki merged commit 5e842a5 into biegunka:master Mar 20, 2022
netbsd-srcmastr pushed a commit to NetBSD/pkgsrc that referenced this pull request Jan 24, 2023
0.3.3
* Fixed ioctl foreign import. (biegunka/terminal-size#16)
* #alignment is a hsc2hs built-in since some unspecified GHC
   7.x. (biegunka/terminal-size#12)
* Captured possible stty stderr output with a
  pipe. (biegunka/terminal-size#13)
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.

3 participants