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

gh-85984: Major revision of the pty library. #101833

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

8vasu
Copy link
Contributor

@8vasu 8vasu commented Feb 11, 2023

This follows #92365. This is one in a series of PRs aimed at cleaning-up, fixing bugs in, introducing new features in, and updating the code in "Lib/pty.py".

This is expected to fail before the following prerequisites are merged: #101832 and #102413.

Signed-off-by: Soumendra Ganguly soumendraganguly@gmail.com

Signed-off-by: Soumendra Ganguly <soumendraganguly@gmail.com>
@8vasu
Copy link
Contributor Author

8vasu commented Feb 11, 2023

@gpshead This is the main set of changes in this series, but it will not work without
the prerequisites mentioned in the main comment. I am only creating this for your
reference (this explains a lot of the changes/additions in the prerequisite PRs).

Copies
pty master -> standard output (master_read)
standard input -> pty master (stdin_read)"""
fds = [master_fd, STDIN_FILENO]
while fds:
rfds, _wfds, _xfds = select(fds, [], [])
while True:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I do not think that fds is ever empty in this loop. Therefore, I replaced while fds: with the original while True:. Please correct me if I am wrong.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants