Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
File::write uses nonblocking IO when MRI uses blocking #5663
MRI waits if nobody is reading the other side of a pty pair:
However JRuby appears to use non-blocking IO and thus throws an exception:
It took me a bit to figure out that the errno was
I found this as the surprise exception causes a compatibility issue with Pry in a Pty to exit on large output (think ENV inspection, ~12k on my machine) in JRuby, but not under MRI as MRI never throws here.
Huh, that's weird. Our pty library is FFI-based and lives in lib/ruby/stdlib. Maybe you can have a look there and see if something obvious is going on (like setting the IO streams O_NONBLOCK or something).
After too much
Should be GETFD/SETFD according to man pages.
However, I also found that