Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Kern Sibbald
On Tuesday 16 August 2005 20:39, David S. Miller wrote: > From: Kern Sibbald <[EMAIL PROTECTED]> > Date: Tue, 16 Aug 2005 16:38:14 +0200 > > > Someone is setting nonblocking on my socket ! > > Glad that's resolved... Yes, my stupidity. There was one more fcntl() in my source than I thought :-( B

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread David S. Miller
From: Kern Sibbald <[EMAIL PROTECTED]> Date: Tue, 16 Aug 2005 16:38:14 +0200 > Someone is setting nonblocking on my socket ! Glad that's resolved... - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread David S. Miller
From: Alan Cox <[EMAIL PROTECTED]> Date: Tue, 16 Aug 2005 15:03:11 +0100 > You are describing behaviour as expected with nonblocking set. That > suggests to me that something or someone set or inherited the nonblock > flag on that socket. Is the strange behaviour specific to the latest > kernel ?

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread David S. Miller
From: Kern Sibbald <[EMAIL PROTECTED]> Subject: PROBLEM: blocking read on socket repeatedly returns EAGAIN Date: Tue, 16 Aug 2005 15:19:39 +0200 > A read() on a TCP/IP socket, which should block returns -1 with errno=EAGAIN If a signal is delivered to the process during the read(), the

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Kern Sibbald
On Tuesday 16 August 2005 16:03, Alan Cox wrote: > On Maw, 2005-08-16 at 15:19 +0200, Kern Sibbald wrote: > > have written, nor does it write() anything. When my read() is issued, I > > expect it to block, but it immediately returns with -1 and errno set to > > EAGAIN. If the read() is re-issued,

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Alan Cox
On Maw, 2005-08-16 at 16:12 +0200, Kern Sibbald wrote: > I verified that I have not explicitly set nonblocking on the socket, so > expect > it to be default blocking. Depends where it came from and what OS. In particular the blocking state of a socket returned from accept may be the same as the

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Kern Sibbald
On Tuesday 16 August 2005 16:03, Alan Cox wrote: > On Maw, 2005-08-16 at 15:19 +0200, Kern Sibbald wrote: > > have written, nor does it write() anything. When my read() is issued, I > > expect it to block, but it immediately returns with -1 and errno set to > > EAGAIN. If the read() is re-issued,

Re: PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Alan Cox
On Maw, 2005-08-16 at 15:19 +0200, Kern Sibbald wrote: > have written, nor does it write() anything. When my read() is issued, I > expect it to block, but it immediately returns with -1 and errno set to > EAGAIN. If the read() is re-issued, a CPU intensive loop results as long as > the other e

PROBLEM: blocking read on socket repeatedly returns EAGAIN

2005-08-16 Thread Kern Sibbald
A read() on a TCP/IP socket, which should block returns -1 with errno=EAGAIN Unless I am mistaken, the read() should block as the socket is active with no problems. The only "unusual" items are that I have set the network buffer size to 32K (32 * 1024), IPTOS_THROUGHPUT, and keepalive. In addi