-
Notifications
You must be signed in to change notification settings - Fork 476
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
Remove workaround for bug affecting very old platforms #40
Conversation
# termios.TIOCSWINSZ to be truncated. There was a hack here to work | ||
# around this, but it caused problems with newer platforms so has been | ||
# removed. For details see https://github.com/pexpect/pexpect/issues/39 | ||
TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', 2148037735) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we leave the default in this line as it was? I assume FreeBSD sets TIOCSWINSZ
, so the default won't be an issue for you, and I've yet to hear any complaints that the setwinsize method doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, although the -ve default is wrong on both Linux and FreeBSD. Perpahs we should just drop it altogether?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the Linux and FreeBSD we're aware of don't fall back to the default. We know of no situation where the default is used and is wrong, but presumably there was once some situation where it was used and was right, so until I hear otherwise, I'm inclined to leave it alone.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair enough. However I very much doubt there is a platform on which both of the TIOC{G,S}WINSZ defaults in this file are correct (regardless of whether this one is 2148037735 or -2146929561).
TIOCGWINSZ = getattr(termios, 'TIOCGWINSZ', 1074295912)
TIOCSWINSZ = getattr(termios, 'TIOCSWINSZ', -2146929561)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could very well be right.
Remove workaround for bug affecting very old platforms
Thanks! |
#39