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

termio/exec: if pty fd HUP, end read thread #5351

Merged
merged 1 commit into from
Jan 24, 2025
Merged

Conversation

mitchellh
Copy link
Contributor

Fixes #4884

When our command exits, it will close the pty slave fd. This will trigger a HUP on our poll. Previously, we only checked for IN. When a fd is closed, IN triggers forever which would leave to an infinite loop and 100% CPU.

Now, detect the HUP and exit the read thread.

Fixes #4884

When our command exits, it will close the pty slave fd. This will
trigger a HUP on our poll. Previously, we only checked for IN. When a fd
is closed, IN triggers forever which would leave to an infinite loop and
100% CPU.

Now, detect the HUP and exit the read thread.
@mitchellh mitchellh enabled auto-merge January 24, 2025 17:42
@mitchellh mitchellh disabled auto-merge January 24, 2025 17:48
@mitchellh mitchellh merged commit 69dcea5 into main Jan 24, 2025
58 checks passed
@mitchellh mitchellh deleted the push-zuxpxxsqxuln branch January 24, 2025 17:48
@github-actions github-actions bot added this to the 1.1.0 milestone Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

100% CPU when --wait-after-command process exits
1 participant