lkml.org 
[lkml]   [2000]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectre: Changes in the sockets: SIGIO handling
On Fri, 3 Mar 2000, Stephen C. Tweedie wrote:

> If you use poll, and you fail to read all the data which is available,
> then next time you poll you'll find the fd still active. If you rely on
> signals, then it is up to you to make sure that you do all of the work
> specified by the signal, and that absolutely requires that you keep
> reading until there is no more data on the fd.

hmm. i think you only need to loop around and continue read()ing if
the first read() returned a full buffer. this should save a bunch
of extra read() == -1/EWOULDBLOCK returns. i.e. if you asked for 4096
and got 1400 then you don't need to read() again -- 'cause the next
packet will queue up another signal.

Dean


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.047 / U:1.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site