diff options
author | wm4 <wm4@nowhere> | 2013-10-28 23:32:57 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-10-28 23:32:57 +0100 |
commit | dceccaf1695a69227947501102977bbac240977b (patch) | |
tree | 20f95a8ee09c3575599a30b5b0d06a66c750bc6a /TOOLS/mpv_identify.sh | |
parent | e10b362bdb3772bd0634607cfe4d5ef27515777b (diff) | |
download | mpv-dceccaf1695a69227947501102977bbac240977b.tar.bz2 mpv-dceccaf1695a69227947501102977bbac240977b.tar.xz |
getch2: assume EOF when input file descriptor is invalid
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.
Diffstat (limited to 'TOOLS/mpv_identify.sh')
0 files changed, 0 insertions, 0 deletions