fix: Prevent fd double-close and handle EINTR in PTY I/O#105
fix: Prevent fd double-close and handle EINTR in PTY I/O#1052witstudios wants to merge 1 commit intomainfrom
Conversation
ManifestWatcher.deinit closed the file descriptor twice — once via the DispatchSource cancel handler and again explicitly. Now only one path closes it depending on whether a source exists. PTY read and write loops treated EINTR (signal interruption) as fatal when they should retry, which could prematurely terminate the output reader or fail a write on any signal delivery. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
deinitwas closing the file descriptor twice — once via theDispatchSourcecancel handler and again explicitly withclose(fileDescriptor). Fixed by only closing via one path depending on whether a source exists.EINTR(signal interruption) as a fatal error/EOF instead of retrying. A stray signal could terminate the output reader or fail a write.Test plan
🤖 Generated with Claude Code