diff options
author | NRK <nrk@disroot.org> | 2023-07-01 13:03:11 +0600 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2023-07-08 09:03:06 +0200 |
commit | 2e7fcc5a2a04c53c740a66487a39d17eae854f41 (patch) | |
tree | b46f1144aebd3b9f3b9213d350354778ef85a062 /player | |
parent | 6ed521fd14a4cb3ac5bcf69610a8b30fc44facb0 (diff) | |
download | mpv-2e7fcc5a2a04c53c740a66487a39d17eae854f41.tar.bz2 mpv-2e7fcc5a2a04c53c740a66487a39d17eae854f41.tar.xz |
terminal-unix: better error detection logic
the reason for checking `EBADF|EINVAL` specifically is unknown. but it's
clearly not working as intended since it can cause issues like #11795.
instead of checking for "bad errors" check for known "good errors" where
we might not want to break out. this includes:
* EINTR: which can happen if read() is interrupted by some signal.
* EAGAIN: which happens if a non-blocking fd would block. `tty_in` is
_not_ non-blocking, so EAGAIN should never occur here. but it's added
just in case that changes in the future.
Fixes: https://github.com/mpv-player/mpv/issues/11795
Closes: https://github.com/mpv-player/mpv/pull/11805
Diffstat (limited to 'player')
0 files changed, 0 insertions, 0 deletions