[lkml]   [2004]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: UDP recvmsg blocks after select(), 2.6 bug?
David Schwartz wrote:

> The CAVEAT is that 'select', like every other status information function
> provided by the kernel, does not guarantee anything about the future. Just
> like 'stat' does not guarantee that the file size will still be the same
> later when you call 'read'.

This is not a very good counterexample. If I'm the only one accessing a file,
then the file size should not just change all by itself.

As you say, select is level triggered. However, the very definition of select
returning a file descriptor as readable is that a subsequent read will not
block. This seems very straightforward. Maybe it's not the best from a
performance point of view, but it's very straightforward.

So if we change the semantics slightly to say that select returning readable
really means a subsequent *blocking* read will not block, then apps that use
blocking sockets will get proper semantics, and apps using nonblocking reads
will get full performance.

As it stands, it's fairly straightforward to do a DOS and hang various apps with
a single corrupt packet each. This is suboptimal.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 14:07    [W:0.221 / U:0.604 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site