-
Notifications
You must be signed in to change notification settings - Fork 72
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
GetWinsize: inappropriate ioctl for device #6
Comments
Hello! Can you clarify if it is 32 or 64 bit os? On Sat, Aug 13, 2016 at 10:35 AM, dncohen [email protected] wrote:
Sincerely yours Leonid Bugaev |
64-bit openbsd. Was running go 1.6.2. Upgraded to go 1.7, same problems.
|
64-bit Ubuntu 14.04 running into the same issue. |
I have the same issue with code in attachement. Unzip the archive, go in created directory and run 'go run test.go'. The library should look if parent is running in a terminal. |
I have the same issue, but only when running my program to the right of a Unix pipe. |
https://github.com/buger/goterm/blob/master/terminal_sysioctl.go#L26 uses os.Stdin as an argument to the ioctl system call. When the standard input is not a terminal then os.Stdin is useless to ioctl hence The fix is to check whether os.Stdin is a tty, and if not, try os.Stdout or os.Stderr (vim does something like this https://github.com/vim/vim/blob/master/src/os_unix.c#L3861). It's not perfect though, as it can still fail if those three were not ttys. |
updating the module worked for me |
Any idea why I get errors like these?
Running on openbsd, if it matters. I've tried xterm, urxvt, tmux session - same error in each.
Thanks for any help.
The text was updated successfully, but these errors were encountered: