[FFmpeg-devel] libossupport status

Rich Felker dalias
Mon Dec 24 14:51:36 CET 2007

On Sun, Dec 23, 2007 at 02:50:55PM +0100, Luca Abeni wrote:
> Hi Rich,
> On Sun, 2007-12-23 at 05:55 -0500, Rich Felker wrote:
> [...]
> > > This will no work on win32 (there is no F_SETFL on WIN32)
> > 
> > Then add it. Submit patches to mingw for their broken crap, and then
> > require latest mingw...
> > 
> > Anyway WTF is the point of this? O_NONBLOCK is useless; just do a
> > select before attempting to read/write... Or are you worried about
> > running into the Linux bug in select? :)
> As far as I can see, the nonblock option is used only in tcp.c, which
> already uses select() before writing or reading. I do not know if using
> O_NONBLOCK is useless or not (I suspect it is not), but I believe this
> is an orthogonal issue respect to the OS support library, and should be
> fixed (if there is something to fix) with a separate patch.

If a socket has been reported writable by select, then POSIX
guarantees it will not block when writing a number of bytes equivalent
to the current value of SO_SNDLOWAT, or fewer. If it has been reported
readable, it will never block on the next read.

> BTW, where can I find more info about the Linux bug you are citing? I've
> never heared anything about it (and I often use select() in my
> programs)... Is it limited to some particular kernel/libc versions?

It affects UDP only and it's a WONTFIX because the Linux developers
are assholes who don't care that they introduced a DoS bug through
their nonconformance when fixing it would negate their meaningless
0.1% contrived-benchmark gains.

For info read the maradns list archives.

> I see that there are different opinions about this include... I posted a
> version of the patch which uses "#include "os_support.h"", and a version
> that does not require it. Let's see how the discussion evolves...

Whatever header crap is needed from ossupport, it can be in the
replacement headers ossupport supplies for broken operating systems.
There's no need for "os_support.h"


More information about the ffmpeg-devel mailing list