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 pause module so it does not stack trace when redirecting stdout. #42217

Merged

Conversation

samdoran
Copy link
Contributor

@samdoran samdoran commented Jul 2, 2018

SUMMARY

When redirecting stdout to a file, calling tty.setraw() caused a stack trace since a file cannot be set to raw mode. This PR ensures that stdout is a TTY before setting raw mode.

Fixes #41717

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

pause.py

ANSIBLE VERSION
2.5
2.6
2.7

@ansibot
Copy link
Contributor

ansibot commented Jul 2, 2018

@ansibot ansibot added affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. needs_triage Needs a first human triage before being processed. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests. needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. labels Jul 2, 2018
@bcoca bcoca removed the needs_triage Needs a first human triage before being processed. label Jul 3, 2018
@ansibot ansibot removed the needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR. label Jul 3, 2018
@samdoran samdoran merged commit 1d1595b into ansible:devel Jul 6, 2018
@samdoran samdoran deleted the issue/41717-pause-stdout-redirection branch July 6, 2018 21:19
samdoran added a commit to samdoran/ansible that referenced this pull request Jul 6, 2018
…nsible#42217)

* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b)
samdoran added a commit to samdoran/ansible that referenced this pull request Jul 6, 2018
…nsible#42217)

* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b)
jhutar added a commit to redhat-performance/satperf that referenced this pull request Jul 10, 2018
mattclay pushed a commit that referenced this pull request Jul 17, 2018
…42217)

* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b)
nitzmahone pushed a commit that referenced this pull request Jul 23, 2018
…42217) (#42441)

* Use separate variables for stdin and stdout file descriptors

* Do not set stdout to raw mode when output is not a TTY

(cherry picked from commit 1d1595b)
@ansible ansible locked and limited conversation to collaborators Jul 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
affects_2.7 This issue/PR affects Ansible v2.7 bug This issue/PR relates to a bug. support:core This issue/PR relates to code supported by the Ansible Engineering Team. test This PR relates to tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pause play fails with exception when output is redirected
3 participants