r3155 - trunk/varnish-cache/bin/varnishd

sky at projects.linpro.no sky at projects.linpro.no
Tue Sep 2 19:54:33 CEST 2008


Author: sky
Date: 2008-09-02 19:54:33 +0200 (Tue, 02 Sep 2008)
New Revision: 3155

Modified:
   trunk/varnish-cache/bin/varnishd/cache_cli.c
Log:
If you attach gdb to a running varnish child, then when you tell it to continue it will abort if assertions are enabled due to poll returning with EINTR.

This just re-enters the loop.



Modified: trunk/varnish-cache/bin/varnishd/cache_cli.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_cli.c	2008-09-02 14:01:39 UTC (rev 3154)
+++ trunk/varnish-cache/bin/varnishd/cache_cli.c	2008-09-02 17:54:33 UTC (rev 3155)
@@ -153,6 +153,8 @@
 		pfd[0].fd = heritage.cli_in;
 		pfd[0].events = POLLIN;
 		i = poll(pfd, 1, -1);
+		if (i == -1 && errno == EINTR)
+			continue;
 		assert(i == 1);
 		if (pfd[0].revents & POLLHUP) {
 			fprintf(stderr,




More information about the varnish-commit mailing list