Skip to content

Commit

Permalink
Handle PTY EIO error for Rust 1.55+
Browse files Browse the repository at this point in the history
`ErrorKind::Other` no longer includes `EIO` since Rust 1.55:

    https://blog.rust-lang.org/2021/09/09/Rust-1.55.0.html#stdioerrorkind-variants-updated

It was not precise enough from the very beginning, as the comment says
that only EIO should be hidden, while the code was any uncategorised
errors.
  • Loading branch information
ilya-bobyr authored Sep 19, 2021
1 parent fb1b7f6 commit 58985a4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion alacritty_terminal/src/event_loop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ where
// This sucks, but checking the process is either racy or
// blocking.
#[cfg(target_os = "linux")]
if err.kind() == ErrorKind::Other {
if err.raw_os_error() == Some(libc::EIO) {
continue;
}

Expand Down

0 comments on commit 58985a4

Please sign in to comment.