gemini-cli PR fixes orphan /dev/ptmx master FD leak on macOS PTY spawn

ugorla-dev · ghdev · 2026-11-07

PR #30184 in google-gemini/gemini-cli fixes a macOS /dev/ptmx master file descriptor leak. Root cause: @lydell/[email protected]'s ptyposixspawn opens dummy descriptors in a lowfds loop, but an early break leaves an unattached /dev/ptmx master fd open after every pty.spawn(), eventually exhausting kern.tty.ptmxmax in long sessions. The PR adds closeOrphanMasterFd to synchronously detect and close the orphan character device, plus integration tests verifying fd counts stay flat.

Original post →

More from coding & agent

coding & agent channel →