[vlc-devel] [PATCH] access directory: try opening files as non blocking (fix #6940).

Rémi Denis-Courmont remi at remlab.net
Fri Jun 15 16:58:18 CEST 2012


Le vendredi 15 juin 2012 17:43:38 Tobias Güntner, vous avez écrit :
> Right now, the code in question only cares about directories and closes
> everything else immediately [1]. With O_DIRECTORY, only directories
> would be opened in the first place. And since (obviously ;)) FIFOs are
> not directories, O_NONBLOCK would not be needed at all. Correct? :D

Sure. At dir.c:337, O_DIRECTORY would actually simplify and speed up things.

However, at file.c:175, we rely on O_NONBLOCK having no effects for 
directories, which is theoretically not portable. And I don't see any solution 
that would be both portable and race-free.

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



More information about the vlc-devel mailing list