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
Patch for bugs in pty.py #46741
Comments
The attached patch fixes some bugs in the pty.py module:
|
Hi Fergus, I would suggest using "if not data" to check for EOF |
On Tue, Mar 25, 2008 at 9:22 PM, Guilherme Polo <report@bugs.python.org> wrote:
Good idea. |
Fergus, |
The spawn change (the last hunk of the original patch) is a bug fix, not Now I guess you can argue that (2) is an RFE. Those are both separate from the other bug fixed in the patch: It's a little tricky to write a test of the _copy() loop bug, for I can maybe figure out how deal with (a), but I'm not sure how to I will split the patch up into two patches, one of which addresses I have addressed Guilherme Polo's suggestion about using "if not data". |
Woops, didn't mean to delete that file. Reattaching. |
That didn't work so well :( |
OK, file restored. Design bugs are usually fixed by "feature requests" :) See bpo-967171 for the feature request. |
New changeset 994659efa292 by Gregory P. Smith in branch '3.2': New changeset c7338f62f956 by Gregory P. Smith in branch 'default': New changeset f889458c65cc by Gregory P. Smith in branch '2.7': |
I'm keeping this open to address the added behavior for spawn in 3.3. |
New changeset ec2921d4de37 by Gregory P. Smith in branch 'default': |
The test breaks on OpenIndiana (and possibly elsewhere): ====================================================================== Traceback (most recent call last):
File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_pty.py", line 200, in test_spawn_returns_status
status = pty.spawn([sys.executable, '-c', 'import sys; sys.exit(0)'])
File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/pty.py", line 175, in spawn
_copy(master_fd, master_read, stdin_read)
File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/pty.py", line 147, in _copy
rfds, wfds, xfds = select(fds, [], [])
File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_pty.py", line 65, in handle_sig
self.fail("isatty hung")
AssertionError: isatty hung |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: