mirror of
https://github.com/wez/wezterm.git
synced 2024-08-17 02:00:25 +03:00
windows: handle broken pipe on read and treat as 0 bytes read
This commit is contained in:
parent
ea0d3a0ed1
commit
56a0de9362
@ -188,7 +188,12 @@ impl io::Read for FileDescriptor {
|
||||
)
|
||||
};
|
||||
if ok == 0 {
|
||||
Err(IoError::last_os_error())
|
||||
let err = IoError::last_os_error();
|
||||
if err.kind() == std::io::ErrorKind::BrokenPipe {
|
||||
Ok(0)
|
||||
} else {
|
||||
Err(err)
|
||||
}
|
||||
} else {
|
||||
Ok(num_read as usize)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user