mirror of https://github.com/mpv-player/mpv
0ba3760745
When starting mpv with nohup, file descriptor 0 seems to be invalid for some reason. (I'm not quite sure why it should be... /proc/pid/fd/0 seems to indicate it's just /dev/null, and using /dev/null explicitly shows that it works just fine.) select() will always immediately return, and this causes mpv to burn CPU without reason. Fix this by treating it as EOF when read() returns EBADF. Also add EINVAL to this condition, because it seems like a good idea. Conflicts: osdep/getch2.c |
||
---|---|---|
.. | ||
ar | ||
getch2-win.c | ||
getch2.c | ||
getch2.h | ||
glob-win.c | ||
glob.h | ||
io.c | ||
io.h | ||
macosx_application.h | ||
macosx_application.m | ||
macosx_application_objc.h | ||
macosx_compat.h | ||
macosx_events.h | ||
macosx_events.m | ||
mpv.exe.manifest | ||
mpv.rc | ||
numcores.c | ||
numcores.h | ||
path-macosx.m | ||
path-win.c | ||
path.h | ||
priority.c | ||
priority.h | ||
timer-darwin.c | ||
timer-linux.c | ||
timer-win2.c | ||
timer.c | ||
timer.h |