Messages in this thread | | | Date | Mon, 6 Mar 2000 08:46:14 -0800 (PST) | From | Dean Gaudet <> | Subject | re: 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/
| |