fix(core): handle EBADF error when resizing a closed PTY - #27531
fix(core): handle EBADF error when resizing a closed PTY#27531anexoluiz wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a crash in the Gemini CLI that occurs when a PTY resize event is triggered for a terminal that has already been closed. By correctly identifying the EBADF error, the service can now handle these events gracefully, improving the stability of the terminal interface in environments with rapid layout changes. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request attempts to add a check for the 'EBADF' error code in shellExecutionService.ts. However, it introduces a duplicate declaration of the block-scoped variable isEbadf, which will cause a compilation error. The reviewer correctly identified this issue and provided a suggestion to remove the redundant line.
734fc2d to
ddc2b55
Compare
|
/gemini review |
|
Fixes #27528 @gemini-code-assist |
545ab78 to
caaffee
Compare
|
Fixes #27528. This PR fixes the PTY resize race condition. |
0de9afe to
b499c80
Compare
b499c80 to
08563c0
Compare
|
Closing this as I see #27461 has already addressed the issue in main. |
This PR fixes a crash in the Gemini CLI that occurs when attempting to resize a PTY that has already been closed. This is a common race condition in environment with tiled window managers or terminal multiplexers like Zellij, where rapid layout changes can trigger a resize event exactly as a process terminates, leading to an Error: ioctl(2) failed, EBADF.