[vlc-devel] [PATCH] Added support for VDR recordings.

Rémi Denis-Courmont remi at remlab.net
Sat Apr 17 15:48:02 CEST 2010


Le mardi 13 avril 2010 22:55:37 Rémi Denis-Courmont, vous avez écrit :
> > Because of O_NONBLOCK then? I tried to read files the same way file.c
> > does.
> 
> Did you enable non-blocking mode? That makes no sense as you're explicitly
> checking that the files are regular. Non-blocking mode has no effect on
> regular files (see POSIX).

Correction. You did not enable non-blocking mode. You had enabled non-bocking 
open(). In my understanding, this does not propagate to the file descriptor; 
it merely prevents the open() call from blocking. This is more commonly done 
with O_NDELAY (which is a synomym). It is often combined with O_NOCTTY.

file.c does that so that the thread does not freeze when trying to open a pipe 
or a character device.

That said, the check for EAGAIN error from read() was still useless anyway. 
And so would have been non-blocking mode.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list