Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
os: OpenFile issue on darwin: 100% CPU on pty master read #22099
os.OpenFile calls os.newFile with
On darwin, open
My guess is that having the slave in non-blocking mode is the reason why read on the master takes 100% CPU.
Details of the issue: kr/pty#52
Is it expected always set the poller when using os.OpenFile? Maybe we should take a look at the flags and see if there is O_NONBLOCK instead of forcing it or maybe introduce a new flag to toggle the poller?
To reproduce on darwin: https://play.golang.org/p/rq8pJGL3ey
On Darwin we use the poller when the operating system permits us to use
The workaround of using