Skip to content

terminal: Fix terminal not closing after non-zero shell exit#52520

Merged
Veykril merged 2 commits intomainfrom
fix-terminal-freeze-after-nonzero-exit
Mar 27, 2026
Merged

terminal: Fix terminal not closing after non-zero shell exit#52520
Veykril merged 2 commits intomainfrom
fix-terminal-freeze-after-nonzero-exit

Conversation

@smitbarmase
Copy link
Copy Markdown
Member

@smitbarmase smitbarmase commented Mar 26, 2026

Closes #38901

Supersedes #39082

This PR fixes an issue where the terminal tab would stay open after the user exits a shell that has a non-zero exit code (e.g. running false then exit, or pressing Ctrl-C followed by Ctrl-D). We now track whether any keyboard input was sent to distinguish user-initiated exits from shell spawn failures.

Release Notes:

  • Fixed terminal tab not closing when the shell exits with a non-zero code.

Co-authored-by: Glenn Miao one.lemorage@gmail.com

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 26, 2026
@zed-codeowner-coordinator zed-codeowner-coordinator bot requested review from a team, Veykril and cole-miller and removed request for a team March 26, 2026 19:08
@zed-community-bot zed-community-bot bot added the staff Pull requests authored by a current member of Zed staff label Mar 26, 2026
@Veykril Veykril merged commit 80b86ce into main Mar 27, 2026
31 checks passed
@Veykril Veykril deleted the fix-terminal-freeze-after-nonzero-exit branch March 27, 2026 07:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Terminal freezes in Linux session when Ctrl+C is pressed before exit

2 participants