Rust's stdlib, pty close, and EIO

This is motivated by panics when log is called after pty closes with EIO · Issue #53 · cardoe/stderrlog-rs · GitHub

I am wondering if the standard library should handle the condition a pseudo tty closes and returns on EIO on read or write since this currently breaks any application that was started on a pty that closes while the application is running. It is possible this is by design since it might not be desirable for applications to outlive the pty, but on the other hand I wouldn't expect most applications to handle EIO for ptys specifically.

Is this working-as-intended, or do we have an oversight to address?