Re: [Patch 1/1] CLD: forgot FD_ZERO in test/large-object.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/02/2009 08:53 PM, Pete Zaitcev wrote:
Signed-Off-By: Pete Zaitcev<zaitcev@xxxxxxxxxx>
---
  test/large-object.c |    1 +
  1 file changed, 1 insertion(+)

diff --git a/test/large-object.c b/test/large-object.c
index f0884b8..fbed9b7 100644
--- a/test/large-object.c
+++ b/test/large-object.c
@@ -28,6 +28,7 @@ static bool send_buf(struct st_client *stc, int sfd, void *buf, size_t buf_len)
  	while (buf_len) {
  		FD_ZERO(&wset);
  		FD_SET(sfd,&wset);
+		FD_ZERO(&rset);
  		FD_SET(sfd,&rset);
  		rc = select(sfd + 1,&rset,&wset, NULL, NULL);
  		OK(rc>= 0);

applied to chunkd ($subject indicated cld)

This is one of the many reasons why I prefer poll(2). One record per poll entry, which is quite convenient for small numbers of fd's.

	Jeff




--
To unsubscribe from this list: send the line "unsubscribe hail-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux