mpv/osdep
NRK 2e7fcc5a2a 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
2023-07-08 09:03:06 +02:00
..
android osdep: remove posix_spawn() helpers and wrappers 2020-05-15 16:37:41 +02:00
macos options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
win32 build: add meson build support 2021-11-14 19:13:10 +00:00
apple_utils.c osdep: move cfstr<->cstr conversions to a new apple_utils.c file 2023-06-25 11:01:58 +02:00
apple_utils.h osdep: move cfstr<->cstr conversions to a new apple_utils.c file 2023-06-25 11:01:58 +02:00
atomic.h osdep/atomic: add mp_atomic_double 2022-04-02 21:41:58 +03:00
compiler.h osdep: add MP_FALLTHROUGH 2023-02-02 14:23:02 +00:00
endian.h audio: drop swapped-endian audio formats 2014-09-23 23:09:25 +02:00
getpid.h lua+js: Implement utils.getpid() 2018-02-13 20:16:01 -08:00
glob-win.c Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
io.c osdep/io: add void to mp_penviron 2023-02-02 14:23:02 +00:00
io.h win32: scripting utils.get_env_list(): use UTF-8 2020-08-16 12:24:19 +03:00
language-apple.c osdep: add mp_get_user_langs 2023-06-25 11:01:58 +02:00
language-posix.c osdep: add mp_get_user_langs 2023-06-25 11:01:58 +02:00
language-win.c osdep: add mp_get_user_langs 2023-06-25 11:01:58 +02:00
macOS_swift_bridge.h mac: replace old event tap for media key support with MediaPlayer 2019-12-15 20:07:31 +01:00
macosx_application.h options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
macosx_application.m options: transition options from OPT_FLAG to OPT_BOOL 2023-02-21 17:15:17 +00:00
macosx_application_objc.h mac: fix media key support for libmpv users 2020-02-22 13:56:31 +01:00
macosx_compat.h mac: add missing semicolon to macosx_compat.h 2019-01-26 20:44:36 +01:00
macosx_events.h mac: remove Apple Remote support 2019-12-15 20:07:31 +01:00
macosx_events.m macos: add support for F13-F20 keys 2022-09-02 14:05:46 +02:00
macosx_events_objc.h mac: fix media key support for libmpv users 2020-02-22 13:56:31 +01:00
macosx_menubar.h various: fix typos 2022-04-25 09:07:18 -04:00
macosx_menubar.m mac: add ability to toggle visibility on all workspaces from menubar 2021-02-21 13:38:53 +01:00
macosx_menubar_objc.h osx: refactor menu bar creation 2017-08-18 19:20:41 +02:00
macosx_touchbar.h mac: only update touch bar items when necessary 2021-02-13 15:51:32 +01:00
macosx_touchbar.m mac: only update touch bar items when necessary 2021-02-13 15:51:32 +01:00
macosx_versions.h osx: change license of OSX and cocoa files to LGPL 2017-06-24 16:29:22 +02:00
main-fn-cocoa.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-unix.c build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
main-fn-win.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
main-fn.h build: move main-fn files to osdep 2015-05-02 18:59:58 +02:00
mpv.exe.manifest win32: request the UTF-8 code page for Windows APIs 2020-08-08 15:00:25 +03:00
mpv.rc build: change filenames of generated files 2020-06-04 16:59:05 +02:00
path-darwin.c osdep: separate out macos paths from path-unix.c 2023-05-09 20:37:17 +00:00
path-macosx.m osx: fix bundle on macOS High Sierra (10.13) 2017-10-03 11:30:56 +02:00
path-unix.c player: use XDG_CACHE_HOME by default 2023-05-09 20:37:17 +00:00
path-uwp.c Universal Windows Plaform (UWP) support 2017-06-29 10:36:16 +02:00
path-win.c path: do not use old_home for win32 exe dir 2020-11-16 00:44:40 +02:00
path.h player: use XDG_CACHE_HOME by default 2023-05-09 20:37:17 +00:00
polldev.c osdep: remove erroneous POLLERR emulation 2023-06-29 13:17:56 +02:00
polldev.h osdep: remove erroneous POLLERR emulation 2023-06-29 13:17:56 +02:00
semaphore.h osdep: hack to fix build with low quality pthreads-w32 headers 2014-09-20 04:18:40 +02:00
semaphore_osx.c Fix use of ISC license 2017-04-15 16:20:00 +02:00
strnlen.h osdep: make use of HAVE_ANDROID 2018-08-20 17:16:22 +02:00
subprocess-dummy.c command: extend subprocess command 2020-07-20 21:02:17 +02:00
subprocess-posix.c subprocess: unblock/reset signals before running child process 2021-12-19 15:02:18 +01:00
subprocess-win.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
subprocess.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
subprocess.h command: extend subprocess command stdin, change behavior 2020-08-16 02:54:44 +02:00
terminal-dummy.c osdep/terminal: Add function to get terminal pixel dimensions 2020-11-22 13:34:25 +02:00
terminal-unix.c terminal-unix: better error detection logic 2023-07-08 09:03:06 +02:00
terminal-win.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
terminal.h osdep/terminal.h: Rename screen buffer controls 2022-12-20 10:26:53 +01:00
threads.c build: restore BSD thread names after 9f461b85bf 2020-04-23 13:58:16 +02:00
threads.h osdep: add a pthread debugging wrapper 2020-03-18 22:42:13 +01:00
timer-darwin.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
timer-linux.c various: drop unused #include "config.h" 2023-02-20 14:21:18 +00:00
timer-win2.c win32: Windows 10: timeBeginPeriod on demand 2021-09-21 00:45:08 +10:00
timer.c misc/random: add xoshiro random number implementation 2022-08-17 10:21:55 -04:00
timer.h win32: Windows 10: timeBeginPeriod on demand 2021-09-21 00:45:08 +10:00
w32_keyboard.c w32: fix typo in F23 mapping 2022-09-03 08:46:42 -04:00
w32_keyboard.h w32_common: handle media keys 2017-08-05 02:38:44 +10:00
win32-console-wrapper.c win32-console-wrapper: silence missing prototype warnings 2019-05-10 21:06:58 +10:00
windows_utils.c subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00
windows_utils.h subprocess-win: update to mp_subprocess2 2020-07-20 21:02:17 +02:00