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

[PATCH] open conserver client connections in nonblocking mode

Eric Biederman ebiederm@aristanetworks.com
Fri, 25 Sep 2009 05:48:41 GMT


I recently tracked down a nasty conserver stall to the fact that conserver opens
connections to the console program and leaves the socket in blocking mode,
due to what looks like a silly typo.

The attached patch fixes that typo, and prevents the stall I was seeing from
happening.

Eric
--- conserver-8.1.16/conserver/group.c-orig	2009-09-24 14:21:07.753504391 -0700
+++ conserver-8.1.16/conserver/group.c	2009-09-24 14:21:11.817502694 -0700
@@ -4716,7 +4716,7 @@
 	    continue;
 	}
 
-	if (SetFlags(sfd, O_NONBLOCK, 0)) {
+	if (SetFlags(fd, O_NONBLOCK, 0)) {
 	    pGE->pCLfree->fd = FileOpenFD(fd, simpleSocket);
 	    FileSetQuoteIAC(pGE->pCLfree->fd, FLAGTRUE);
 	} else