8000 bpo-40155: Stop `test_builtin` from hanging on AIX, Solaris and maybe others. by aixtools · Pull Request #19308 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40155: Stop test_builtin from hanging on AIX, Solaris and maybe others. #19308

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions Lib/test/test_builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1893,12 +1893,18 @@ def run_child(self, child, terminal_input):
self.fail("got %d lines in pipe but expected 2, child output was:\n%s"
% (len(lines), child_output))

# Wait until the child process completes before closing the PTY to
# prevent sending SIGHUP to the child process.
support.wait_process(pid, exitcode=0)
if sys.platform == "linux" or not os.name == "posix":
# Wait until the child process completes before closing the PTY to
# prevent sending SIGHUP to the child process.
support.wait_process(pid, exitcode=0)

# Close the PTY
os.close(fd)
# Close the PTY
os.close(fd)
else:
# Other posix need to close the pty for the child to exit normally
# Close the PTY
os.close(fd)
support.wait_process(pid, exitcode=0)

return lines

Expand Down
0