summaryrefslogtreecommitdiffstats
path: root/video/out/gl_x11.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-10-28 23:32:57 +0100
committerwm4 <wm4@nowhere>2013-11-02 19:05:04 +0100
commit0ba37607451da7b85b295e68c7824bb73b631b48 (patch)
tree78ba3523cd69304a42f12215fa00fe181abe370d /video/out/gl_x11.c
parent1dbbd845a47a0008b79f99dced9a778189f9fd79 (diff)
downloadmpv-0ba37607451da7b85b295e68c7824bb73b631b48.tar.bz2
mpv-0ba37607451da7b85b295e68c7824bb73b631b48.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. Conflicts: osdep/getch2.c
Diffstat (limited to 'video/out/gl_x11.c')
0 files changed, 0 insertions, 0 deletions