We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3a5fa86 commit ce9e875Copy full SHA for ce9e875
src/reader.rs
@@ -171,11 +171,11 @@ impl NBReader {
171
// this is just from experience, e.g. "sleep 5" returns the other error which
172
// most probably means that there is no stdout stream at all -> send EOF
173
// this only happens on Linux, not on OSX
174
- Err(PipeError::IO(ref err)) if err.kind() == io::ErrorKind::Other => {
175
- self.eof = true
+ Err(PipeError::IO(ref err)) => {
+ // For an explanation of why we use `raw_os_error` see:
176
+ // https://github.com/zhiburt/ptyprocess/commit/df003c8e3ff326f7d17bc723bc7c27c50495bb62
177
+ self.eof = err.raw_os_error() == Some(5)
178
}
- // discard other errors
- Err(_) => {}
179
180
181
Ok(())
0 commit comments