Re: sendfile and EAGAIN

2013-03-04 Thread Eric Wong
Ulrich Drepper wrote: > On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet wrote: > > I don't understand the issue. > > > > sendfile() returns -EAGAIN only if no bytes were copied to the socket. > > There is something wrong/unexpected/... > > I have a program which can use either sendfile or send.

Re: sendfile and EAGAIN

2013-03-02 Thread H. Peter Anvin
On 02/25/2013 09:22 AM, Ulrich Drepper wrote: > When using sendfile with a non-blocking output file descriptor for a > socket the operation can cause a partial write because of capacity > issues. This is nothing critical and the operation could resume after > the output queue is cleared. The prob

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Sat, Mar 2, 2013 at 10:09 PM, Eric Dumazet wrote: > > Using non blocking IO means the sender (and the receiver) must be able > to perform several operations, as long as the whole transfert is not > finished. Certainly, and this is implemented. But the receiver never gets the rest of the data

Re: sendfile and EAGAIN

2013-03-02 Thread Eric Dumazet
On Sat, 2013-03-02 at 20:41 -0500, Ulrich Drepper wrote: > On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet wrote: > > I don't understand the issue. > > > > sendfile() returns -EAGAIN only if no bytes were copied to the socket. > > There is something wrong/unexpected/... > > I have a program which

Re: sendfile and EAGAIN

2013-03-02 Thread Ulrich Drepper
On Mon, Feb 25, 2013 at 2:22 PM, Eric Dumazet wrote: > I don't understand the issue. > > sendfile() returns -EAGAIN only if no bytes were copied to the socket. There is something wrong/unexpected/... I have a program which can use either sendfile or send. When using sendfile to transmit a large

Re: sendfile and EAGAIN

2013-02-25 Thread Eric Dumazet
On Mon, 2013-02-25 at 12:22 -0500, Ulrich Drepper wrote: > When using sendfile with a non-blocking output file descriptor for a > socket the operation can cause a partial write because of capacity > issues. This is nothing critical and the operation could resume after > the output queue is cleared