-
Notifications
You must be signed in to change notification settings - Fork 5.6k
terminal: Fix terminal freezing caused by non-zero exit code #40456
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
Conversation
For the context, we have another attempt here: #39082 |
Another context bit. zed/crates/terminal/src/terminal.rs Lines 2435 to 2437 in 81425be
|
@SomeoneToIgnore should I worry about the failed test? it seems to be a worktree issue but i did not touch any of that logic. |
Looks like an unfortunate flak to me. |
would you like me to add a test? |
Sorry, missed that message. Thx. |
Concerning the test, here are my findings...
I am going to continue trying to find a way around the inability to invoke SIGINT but if anyone has some suggestions, feel free to let me know. |
Please disregard my previous comment. It was misinformed on certain aspects. I have deduced that the exit code of the process before EOF is the exit code that will be returned. If it is Ctrl-C it returns 130, The nature of my fix for the freezing bug was to just allow the 130 and the 0 to be valid exit codes. Instead of testing for exit code 0, the test now simply tests to see if it exits at all after the keystrokes are passed. As long as we receive an exit code after EOF the test will pass. |
@Veykril I have tried my hand at fixing this issue, but the issue is steming from |
Closes #38901 and #40283
Release Notes:
exit
or Ctrl+D when the previous command had a non-zero exit code