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

Fix zero size on TTY over SSH #24

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

furbyhaxx
Copy link

I noticed that when connected trough SSH (or using RustRover over Jetbrains Gateway) the termsize is always zero.
So I implemented a check if the "SSH_TTY" env variable is set and get the corresponding file descriptor and use that for the term size.

STDOUT_FILENO
};

let r = unsafe { ioctl(fd, TIOCGWINSZ, &mut us) };

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a libc::close call here after r?

@furbyhaxx
Copy link
Author

furbyhaxx commented Jan 7, 2025 via email

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.

2 participants