r2235 - in branches/1.2: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Thu Nov 8 22:07:37 CET 2007


Author: des
Date: 2007-11-08 22:07:37 +0100 (Thu, 08 Nov 2007)
New Revision: 2235

Modified:
   branches/1.2/
   branches/1.2/bin/varnishd/cache_acceptor_kqueue.c
Log:
Merged revisions 2232 via svnmerge from 
svn+ssh://projects.linpro.no/svn/varnish/trunk/varnish-cache

........
  r2232 | des | 2007-11-08 21:30:06 +0100 (Thu, 08 Nov 2007) | 4 lines
  
  Minimal intervention fix for #162: we can delay arming a kevent, but we
  can't delay disarming it, or we will have a race between the acceptor and
  a worker thread.  This will need revisiting at some later date.
........



Property changes on: branches/1.2
___________________________________________________________________
Name: svnmerge-integrated
   - /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2173,2175-2176,2180-2184,2186-2193,2206,2208,2210-2215,2220,2222-2231
   + /trunk/varnish-cache:1-2101,2104-2107,2115-2120,2122-2130,2133,2151,2153-2154,2157,2161-2162,2166-2168,2173,2175-2176,2180-2184,2186-2193,2206,2208,2210-2215,2220,2222-2232

Modified: branches/1.2/bin/varnishd/cache_acceptor_kqueue.c
===================================================================
--- branches/1.2/bin/varnishd/cache_acceptor_kqueue.c	2007-11-08 21:06:49 UTC (rev 2234)
+++ branches/1.2/bin/varnishd/cache_acceptor_kqueue.c	2007-11-08 21:07:37 UTC (rev 2235)
@@ -66,8 +66,8 @@
 	if (sp->fd < 0)
 		return;
 	EV_SET(&ki[nki], sp->fd, EVFILT_READ, arm, 0, 0, sp);
-	if (++nki == NKEV) {
-		assert(kevent(kq, ki, nki, NULL, 0, NULL) <= 0);
+	if (++nki == NKEV || arm == EV_DELETE) {
+		AZ(kevent(kq, ki, nki, NULL, 0, NULL));
 		nki = 0;
 	}
 }




More information about the varnish-commit mailing list